[CentOS] cron jobs fail to run

Wed Jan 5 15:45:37 UTC 2011
Dominik Zyla <gavroche at gavroche.pl>

On Wed, Jan 05, 2011 at 10:29:52AM -0500, Mike Burger wrote:
> 
> > hey centos
> >
> >  long time no hear! :) I'm having a small issue where the backup jobs
> > that I set to run in the crontab of the backup user do not appear to
> > be running. Here's how I set it up (with crontab -e as the backup
> > user):
> >
> > run amanda every night (check at 2:45 and backup at 3)
> >
> > 45 2 * * * /usr/sbin/amcheck  /var/log/amanda/crontab/amcheck.log
> > * 3 * * * /usr/sbin/amdump  /var/log/amanda/crontab/amdump.log
> >
> > The executables are where they are supposed to be and run if you type
> > them in on the command line:
> >
> > [amandabackup at amanda ~]$ ls -l /usr/sbin/amcheck
> > -rwsr-x--- 1 root disk 68624 Dec 29 14:08 /usr/sbin/amcheck
> >
> >
> > [amandabackup at amanda ~]$ ls -l /usr/sbin/amdump
> > -rwxr-xr-x 1 amandabackup disk 9637 Dec 29 14:08 /usr/sbin/amdump
> >
> > Although I'm not sure what the 's' indicates in the permissions of
> > amcheck.
> >
> >
> > And here's a tail of the cron logs
> >
> > [root at amanda init.d]# tail /var/log/cron
> > Jan  5 07:01:01 newamanda crond[13612]: (root) CMD (run-parts
> > /etc/cron.hourly)
> > Jan  5 07:17:09 newamanda crontab[13652]: (amandabackup) BEGIN EDIT
> > (amandabackup)
> > Jan  5 07:18:00 newamanda crontab[13652]: (amandabackup) REPLACE
> > (amandabackup)
> > Jan  5 07:18:00 newamanda crontab[13652]: (amandabackup) END EDIT
> > (amandabackup)
> > Jan  5 07:18:01 newamanda crond[1448]: (amandabackup) RELOAD
> > (cron/amandabackup)
> > Jan  5 07:18:39 newamanda crond[13686]: (CRON) STARTUP (V5.0)
> > Jan  5 07:23:01 newamanda crontab[13699]: (amandabackup) BEGIN EDIT
> > (amandabackup)
> > Jan  5 07:23:47 newamanda crontab[13699]: (amandabackup) END EDIT
> > (amandabackup)
> > Jan  5 07:25:38 newamanda crontab[13751]: (amandabackup) BEGIN EDIT
> > (amandabackup)
> > Jan  5 07:25:53 newamanda crontab[13751]: (amandabackup) END EDIT
> > (amandabackup)
> >
> > thanks in advance!
> 
> Not using Amanda, myself, it appears to me that the syntax of the commands
> in your crontab is incorrect.  Assuming that the last parameter on each
> line is a log into which you wish to redirect the output of cron'd
> commands, you need to add > or >> (if you wish to append) between the
> command and the path to the log file.
> 
> Otherwise, cron would be trying to run the amanda commands with the last
> item (the log file?) as a command line parameter. As I don't run Amanda, I
> don't know whether you're trying to pass those log files as command line
> parameters to the amcheck and amdump commands or wish the output of those
> commands to be sent to those files.

Try to run that commands by your hand, and check what is the problem.

-- 
Dominik Zyla

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20110105/19bf2676/attachment-0005.sig>