[X-Unix] Cron problem? [maybe]

..lj darwin at ljsworld.com
Thu Nov 10 19:05:30 PST 2005


On Nov 10, 2005, at 17:48, Russell McGaha wrote:

> Folks;
> 	I've a bit of a problem; I have an automated script to open a  
> Filemaker Document that doesn't always fire of correctly.  The bash  
> script is supposed to open the document, at 1825 via cron, only  
> sometimes it launches the application without opening the document.  
> Here is the script;
>
> #!/bin/bash
>
> FileMaker="";
> let loop=0;
> echo "Start"
> open /AutoCloseDown;
>
> while [[ "$Filemaker" = "" && ((loop -lt 2)) ]]; do
>
> open /AutoCloseDown;
> Filemaker=$(top -l1 | grep "FileMaker");
>
> echo "Filemaker= "$Filemaker
>
> let loop++
> echo $loop
> sleep 5
> done
>
> echo "stopping"
> exit 0
>
> As you see I try to open the doc twice [to make sure it launches],  
> I thought at first the Filemaker was not launching, but the script  
> now makes sure it does, and the app is open but the Doc doesn't  
> open.  I've also tried this with an Applescript with similar  
> erratic results.  Has anyone out there had any troubles like  
> this??  And more important, have any idea how to make sure this doc  
> opens consistently???
>
> Russell

Any chance you have an issue with a password in FMPro.  It can  
sometime hang up with a dialog box. Other thought. Have considered  
using Apple Script with the bash osascript command?
..lj
  


More information about the X-Unix mailing list