LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-11-2004, 11:45 PM   #1
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
Unhappy crontab not working


I tried testing my crontab with every minute excuting the script (which is working if execute manually).

Below is my crontab -e

* * * * * /opt/Backup.sh
* * * * * echo "Test" >> /opt/test

-rwx------ 1 root root 112 Aug 12 11:00 Backup.sh
 
Old 08-12-2004, 12:48 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 47
have you edited crontab as root or are you referring to your own crontab (both are possible)

If it is your own crontab ... that is ... you ran crontab -e from your login, the second command may work .. but not the first.

If you gave crontab -e as root, both the lines should work ... check /var/log/cron for more info
 
Old 08-12-2004, 01:13 AM   #3
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by ppuru
have you edited crontab as root or are you referring to your own crontab (both are possible)

If it is your own crontab ... that is ... you ran crontab -e from your login, the second command may work .. but not the first.

If you gave crontab -e as root, both the lines should work ... check /var/log/cron for more info
What is the crontab root thing about?

I just login as root and crontab -e.
 
Old 08-13-2004, 12:12 AM   #4
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
bump
 
Old 08-13-2004, 12:15 AM   #5
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 47
check /var/log/cron for clues
 
Old 08-13-2004, 03:12 AM   #6
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by ppuru
check /var/log/cron for clues
Found out that crond isn't running

btw, how to autostart crond on boot?

And I tried linking my script to /etc/rc.d/rc5.d/k01backup. But it did not work? Am I doing anything wrong? I just want the script to be auto executed on boot.

Last edited by subaruwrx; 08-13-2004 at 03:24 AM.
 
Old 08-15-2004, 09:01 AM   #7
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by subaruwrx
Found out that crond isn't running

btw, how to autostart crond on boot?

And I tried linking my script to /etc/rc.d/rc5.d/k01backup. But it did not work? Am I doing anything wrong? I just want the script to be auto executed on boot.
bump
 
Old 08-15-2004, 09:28 AM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Quote:
btw, how to autostart crond on boot?
Use chkconfig to set services to on or off in different run levels. For example, I use --list to show what it is presently set at. I use --level to say what run levels to set... ( 1 2 3 4 5 ) Then the command on to set it to on for those levels. Same for off.

chkconfig --list crond
chkconfig --level 12345 crond on
chkconfig --list crond

Last edited by homey; 08-15-2004 at 09:39 AM.
 
Old 08-17-2004, 10:12 PM   #9
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Thumbs up

Quote:
Originally posted by homey
Use chkconfig to set services to on or off in different run levels. For example, I use --list to show what it is presently set at. I use --level to say what run levels to set... ( 1 2 3 4 5 ) Then the command on to set it to on for those levels. Same for off.

chkconfig --list crond
chkconfig --level 12345 crond on
chkconfig --list crond
thanx
 
  


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
crontab not working durgap Linux - General 6 09-01-2005 03:38 PM
crontab nor working navaladi Mandriva 11 01-17-2005 07:58 AM
some commands not working in crontab navaladi Linux - Newbie 2 01-17-2005 07:07 AM
Unable to get crontab working carlmarshall Linux - Newbie 9 06-10-2004 04:37 PM
Crontab not working Neorio *BSD 1 12-02-2003 08:34 PM


All times are GMT -5. The time now is 11:53 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