[Nelug] cron and ssh
Andrew Hatch
andrew.hatch at bluespace.com
Mon Sep 22 16:10:01 UTC 2003
Figured it out...
I'm not sure where the problem was, but it could be due to the following
changes:
1. the command on the final server was 'cp' which doesn't by default produce
output, so I added the -v option
2. I encased the ssh command in double-quotes and the remote cp command in
single-quotes
It now works!
Thanks,
Andrew.
option
> On Monday 22 Sep 2003 3:01 pm, Andrew Hatch wrote:
> > Any ideas why this script will work fine on a command line, but
> not return
> > when the script is executed via cron?
>
> Whenever this happens, the first thing to check is your PATH:
> cron does not run your .profile or .cshrc or whatever:
> cron scripts are executed with a very limited default path.
>
> Either set PATH in the script, or fully qualify the names of any called
> programs (such as ssh in your example).
More information about the Nelug
mailing list