Re: cron jobs fail to run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@amanda ~]$ ls -l /usr/sbin/amcheck
> > -rwsr-x--- 1 root disk 68624 Dec 29 14:08 /usr/sbin/amcheck
> >
> >
> > [amandabackup@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@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

Attachment: pgpnWT57cPKZF.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux