-   Linux - Software (
-   -   cron jobs not running (

scarr3d 05-10-2004 09:48 PM

cron jobs not running
hi all,

i'm having a problem with my cron jobs on our Debian 3.01 server.

here's a snippet of the 'root' crontab:

0 4 * * 2 root sudo -u jared rsync -a /RAID/Net/ jared@backup:/BACKUP1/Net/

this particular job backs up data to a remote machine, as the user 'jared' (which has password-less ssh setup.)

i restart the cron daemon after every change. why aren't these jobs running?

here's the log:

May 9 04:00:01 BENT00 /USR/SBIN/CRON[16094]: (root) CMD (root^Isudo -u jared rsync -a /RAID/Net/ jared@backup:/BACKUP3/Net/)

is there something in the logs on the receiving machine i could check?


david_ross 05-11-2004 02:17 PM

It may have passwordless ssh set up but you aren't using it - take a look at:

You may also want to start creating logs to find these errros - just add this at the end:
> /var/log/backup-job.log 2>&1

scarr3d 05-11-2004 02:24 PM

i should have noted that, when i run the job manually password-less ssh (and everything else) works just fine.

i'll try adding the line for the new log. won't i just end up with the same message that i already posted though?

thanks for the help.

david_ross 05-11-2004 02:29 PM

I think you'll get another error but you still don't appear to be using ssh - to do that you will need to use "-e ssh".

scarr3d 05-12-2004 06:27 PM

actually, i'll just add the '-e ssh' option for now.

what does this do? "2>&1"

david_ross 05-13-2004 02:03 PM

It redirects stderr to stdout.

scarr3d 05-14-2004 09:53 PM

well, it still didn't work with the '-e ssh' option. :/

i'll post the custom cron log after tonight. thanks again.

scarr3d 05-25-2004 05:21 PM

hmmm, found this in the log...looks unrelated. *sigh*

/bin/sh: root: command not found

could it be an error in my crontab entry? (user: root?)
btw, i'm using 'crontab -e' to edit. what's /etc/crontab for?

All times are GMT -5. The time now is 01:13 AM.