LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-10-2004, 09:48 PM   #1
scarr3d
Member
 
Registered: Oct 2003
Posts: 48

Rep: Reputation: 15
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:

# MONDAY backup TUESDAY AM: Net to BACKUP1
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?

thanks.
 
Old 05-11-2004, 02:17 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
It may have passwordless ssh set up but you aren't using it - take a look at:
http://www.linuxquestions.org/questi...ticle&artid=80

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
 
Old 05-11-2004, 02:24 PM   #3
scarr3d
Member
 
Registered: Oct 2003
Posts: 48

Original Poster
Rep: Reputation: 15
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.
 
Old 05-11-2004, 02:29 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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".
 
Old 05-12-2004, 06:27 PM   #5
scarr3d
Member
 
Registered: Oct 2003
Posts: 48

Original Poster
Rep: Reputation: 15
actually, i'll just add the '-e ssh' option for now.

what does this do? "2>&1"
 
Old 05-13-2004, 02:03 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
It redirects stderr to stdout.
 
Old 05-14-2004, 09:53 PM   #7
scarr3d
Member
 
Registered: Oct 2003
Posts: 48

Original Poster
Rep: Reputation: 15
well, it still didn't work with the '-e ssh' option. :/

i'll post the custom cron log after tonight. thanks again.
 
Old 05-25-2004, 05:21 PM   #8
scarr3d
Member
 
Registered: Oct 2003
Posts: 48

Original Poster
Rep: Reputation: 15
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown only if no cron jobs are running Red Squirrel Linux - Software 4 08-31-2005 02:00 PM
SUID problem running cron jobs? mitchloft Fedora 4 03-24-2005 01:30 PM
cron jobs working2hard Linux - Software 0 07-28-2004 06:31 PM
CRON Jobs scottpioso Linux - Software 63 11-28-2003 07:45 PM
cron jobs Zyanid Linux - Software 0 08-27-2002 06:10 AM


All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration