LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-29-2005, 12:01 PM   #1
dsschanze
Member
 
Registered: Aug 2004
Location: Gainesville, FL
Distribution: Linux Mint 12, Win7, iOS
Posts: 206

Rep: Reputation: 32
Question cron backup job not running


I have just installed CentOS4 on a computer that will run as a SMB server for my dad's chemistry research group. Yesterday, I downloaded a simple backup program, backerupper, that uses cron scheduling to schedule backups at 12:10 AM each day. As I was reading the help file it says that run the setup script, backerupper.start, that moves the program binary to /etc and writes cron scripts to /var/spool/cron/crontabs/cron.update and /var/spool/cron/crontabs/root. Before I ran the setup script, I stopped the crond service and browsed to [b]/var/spool/cron. I found that there was no crontabs folder, thus no cron.update and root files there either. I created the folder crontabs in /var/spool/cron and inside the crontabs folder, I created the two files, cron.update and root. After that I ran the script, backerupper.start, I saw that it wrote 10 0 * * * /usr/local/bin/backerupper 1> /dev/null 2> /dev/null sucessfully to the root file and wrote root to the cron.update file. After that, I started the cron service back up, logged off the computer and went to bed. This morning I check to see if the program backed up to /backup and it didn't. Does anyone know what might be wrong?

The backup program is called backerupper it's url is http://www.bluelavalamp.net/backerupper/.

Thanks in advance,
Derek
 
Old 07-29-2005, 12:14 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
If the /var/spool/cron directory did not already exist, my guess is your version of cron puts configuration files somewhere else. Try just using the 'crontab -e' command to edit your crontab.
 
Old 07-29-2005, 12:18 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
As root, do:

crontab -l

This will list your cron entries, make sure the entry is listed. If not, manually edit by doing this as root:

crontab -e

And add that entry to your crontab, save and exit. No need to stop and restart crond either.
 
Old 07-29-2005, 08:05 PM   #4
dsschanze
Member
 
Registered: Aug 2004
Location: Gainesville, FL
Distribution: Linux Mint 12, Win7, iOS
Posts: 206

Original Poster
Rep: Reputation: 32
This is the cron entry that I am trying to make work
Code:
55 17 * * * * /usr/local/bin/backerupper >> /dev/null 2>&1
Is there something wrong with this or is there a problem with the scheduler?

--Derek
 
Old 07-29-2005, 08:09 PM   #5
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
And that line shows up when you run crontab -l?
 
Old 07-29-2005, 08:25 PM   #6
dsschanze
Member
 
Registered: Aug 2004
Location: Gainesville, FL
Distribution: Linux Mint 12, Win7, iOS
Posts: 206

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by Matir
And that line shows up when you run crontab -l?
Yes, though I refined it from the original version that was generated by the program (that didn't work), which was
Code:
15 13 * * * * /usr/local/bin/backerupper 1> /dev/null 2> /dev/null
 
Old 07-29-2005, 09:08 PM   #7
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
If you run the command manually (just run /usr/local/bin/backerupper from the console) does it function as intended? Also, look in your logs in /var/log to see if there are entries logged from the crond.
 
Old 07-29-2005, 09:35 PM   #8
dsschanze
Member
 
Registered: Aug 2004
Location: Gainesville, FL
Distribution: Linux Mint 12, Win7, iOS
Posts: 206

Original Poster
Rep: Reputation: 32
When I run the command from the terminal, it works fine.
 
Old 07-29-2005, 09:39 PM   #9
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Any entries from crond in the logs?

Also, you do intend for this to run at 1:15 PM (13:15), correct?

Try adding a cronjob like this:
Code:
* * * * * touch /tmp/CRON_IS_RUNNING
Then wait a few minutes and see if /tmp/CRON_IS_RUNNING exists.
 
Old 07-29-2005, 09:47 PM   #10
dsschanze
Member
 
Registered: Aug 2004
Location: Gainesville, FL
Distribution: Linux Mint 12, Win7, iOS
Posts: 206

Original Poster
Rep: Reputation: 32
I have checked the logs and there are a bunch of entries for crond that say session opened, session closed for user root. None of these entries though are at the times that I had specified the job to run in crontab.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
script not running as a cron job sanjith11 Programming 5 11-23-2004 09:42 AM
cron job not running vincebs Linux - Software 34 10-30-2004 02:27 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 09:24 PM
Cron Job Not Running pzorn Linux - General 4 10-02-2003 02:38 PM
cron job - backup medamnit Linux - Newbie 4 05-24-2002 04:37 AM


All times are GMT -5. The time now is 06:53 PM.

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