Need help setting up cron
Luca Ferrari
fluca1978 at infinito.it
Fri Jul 18 08:52:30 UTC 2008
On Thursday 17 July 2008 Robert Dailey's cat, walking on the keyboard, wrote:
> I found out that my script was broken. After fixing it, however, I
> noticed that my directories were being created, but it didn't seem to
> be doing anything else. Note that this script is performing a backup
> and then compressing files. This process can take up to 30 minutes or
> maybe more. The first thing the script is supposed to do is create a
> subversion repository dump file which is about 600MB in size. 20
> minutes after the script was executed, I noticed my dump file was
> created but it was 0 bytes in size. It's almost as if the script was
> prematurely interrupted and wasn't given enough time to finish.
I had similar problems with backup scripts and cron, especially when involving
ssh tasks. If the script runs fine from an interactive shell and does not
from cron, try setting the environment variables as for your interactive
shell. In the crontab palce an entry like:
ENV=/home/myself/.profile
and log your backup output to a file to see if it is working and where it is
stopping:
30 12 * * * root /my/script/file > /tmp/debug.log
Hope this helps,
Luca
More information about the ubuntu-users
mailing list