Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] cron troubles

On Wed, 11 Dec 2002 20:47:51 +1100 (EST)
Howard Lowndes <lannet@xxxxxxxxxxxxx> wrote:
> Unfortunately, not.  Using the two suggestions you offered causes the ssh
> process to hang at different points, but it still hangs.  Still
> scratching... :(

I'll suggest my shell debugging technique:  a "set -x" at the
top and some echoes sprinkled through the file.

The otherbig difference between cron jobs and interactive
jobs (other than the one Peter mentioned) is that cron
jobs don't have all your typical login environment.
Try a ". ~/.profile;" before the command in cron.

I also recommend a "set -u" (die on unset variables)
and "set -e" (die on any error) in shell scripts.
But they take quite a bit of care to deal with.