[ale] cron vs shell

Jonathan Rickman jonathan at xcorps.net
Sun Aug 10 12:12:24 EDT 2003


On Sunday 10 August 2003 10:12, James P. Kinney III wrote:

> After setting up some variables and getting a list of names and machines
> to work on, the script uses ssh to run a remote command to stop a
> process, the is scp's the log file from that process to a common
> location. Then it restarts the remote machine.
>
> It hangs waiting for the process stop to finish when run as a cron job.
> It doesn't when run from the command line.
>
> What is the difference between the two environments such that a process
> stop request will never see it end? I have absolute paths for all the
> commands.

I can't answer your specific question, but I have run into this before and 
ended up using the master script to kick off the slave script (if you know 
what I mean) to avoid this. It was a similar situation involving log 
transfers via scp. I had to break the script up and put the functional part 
on the remote machine itself, then use the cron job on the central machine 
to execute. Makes updates difficult, but it works. Some folks suggested I 
try csh as opposed to sh, but that had no impact. I finally gave up due to 
time constraints, and never got around to fiddling with it any more.

-- 
Jonathan Rickman
X Corps Security
http://www.xcorps.net


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list