Re: FW: Crontab problems

"Taylor, ForrestX" <[email protected]>
Newsgroups gmane.linux.redhat.release.guinness
Message-ID <[email protected]>
Tom Gillon wrote:
> Hi, thanks for the quick reply.
> 
> Here's the crontab entry:
> 
> 0 2 * * * /home/webct/webct_backup
> 
> Here's the contents of the webct_backup file that crontab is calling:
> 
> cd /home/webct/webct/webct/generic/admin
> perl admin.pl batch `ls ../../courses/`
> 
> I don't get an error, it just doesn't complete the backup when run from
> crontab.  It starts the backup process, but ends very early during the
> process.  However, when run from the command line, the admin.pl script
> works fine.  This worked fine in Red Hat 6.2, but since I upgrade to 7.0
> (new hard drive, fresh install), it doesn't work.
> 
> Perhaps there is something in the webct_backup file that is not allowed
> by the cron process?

You could do a couple of things to get more information about what is 
going wrong.  Change your crontab entry to something like this:

0 2 * * * /home/webct/webct_backup &> /home/webct/webct_backup.log

and edit /home/webct/webct_backup, and create/change the first line to 
something like this:

#!/bin/bash -x

That should allow you to see where it is failing.

Forrest
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.