[Techtalk] cron problem running a script

Almut Behrens almut-behrens at gmx.net
Wed Apr 13 08:13:58 EST 2005


On Tue, Apr 12, 2005 at 05:26:40PM -0400, Angelina Carlton wrote:
> 
> So know I know cron is fine and the issue is with the difference
> between running the rdiff-backup command from the command line versus cron.

Often this is due to differences in the environment -- things like
different search paths for other tools run as subprocesses, libs,
configs, whatever...  However, I don't know rdiff-backup well enough to
come up with any specific suggestions.

What I would try is to dump both environments, and compare the cron vs.
the normal environment.  Sometimes, the problem becomes evident rather
soon, once you look at the individual differences...

If that leaves you clueless, you might run rdiff-backup under strace
(with -f to also track any forked processes), to get an idea of where
exactly it's failing (e.g. if it doesn't find a file, a stat()/open()
system call will fail, etc.).

Good luck,
Almut



More information about the Techtalk mailing list