SLUG Mailing List Archives
Re: [SLUG] cron troubles
- To: Howard Lowndes <lannet@xxxxxxxxxxxxx>
- Subject: Re: [SLUG] cron troubles
- From: mlh@xxxxxxxxxx
- Date: Wed Dec 11 22:06:02 2002
- Cc: peter@xxxxxxxxxxxxxxxxxx, slug@xxxxxxxxxxx
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.