LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-01-2006, 08:18 PM   #1
ncracraf
LQ Newbie
 
Registered: Sep 2006
Posts: 3

Rep: Reputation: 0
Crontab not running jobs


I have a series of shell scripts and curl commands scheduled using crontab. I'm on Fedora 4. If I execute any of the scripts or curl's from the command line, they work fine. However none of the jobs seem to be kicked off from crontab.

One curl example is:

10 * * * * curl http: // www dot mydomain dot com / output.php

I had to put "dots" and spaces after the slashes since the forum blocked me from posting a url.

I've set it to run every 10 minutes so I can just see what's going on (or not). The output.php script sends an email to my admin email account. Again, if I run the command from the command line, it works great. I've looked at the crontab log and nothing jumps out at me.

I'm running on a hosted, virtual dedicated server using Plesk as my control panel. It almost appears as if crontab isn't even running but I'm not sure how to check. The other thought that came to mind was a permission issue but I'm not sure where to start with that one. I don't believe crontab is permission based.

Any pointers would be greatly appreciated!

NC
 
Old 09-01-2006, 08:32 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
after you input something into the crontab you need to restart it.
service crond restart
chkconfig --list crond,check whether its on in 3 and 5.
 
Old 09-02-2006, 12:46 AM   #3
ncracraf
LQ Newbie
 
Registered: Sep 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you. I restarted crond and the crontab jobs seem to running fine. The man cron indicates "...cron need not be restarted whenever a crontab file is modified." which is now a little confusing to me.

After I restarted the service, I added another crontab entry but did not restart the service. This new job ran just fine which leads me to believe perhaps you don't need to restart crond after a new addition. However, restarting certainly solved my problem so I can't argue!

Thanks again,

NC
 
Old 09-02-2006, 01:40 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I've never had to restart cron either ... how did you edit the crontab?



Cheers,
Tink
 
Old 09-02-2006, 08:52 AM   #5
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
in fedora core 5 you need to do that.
 
Old 09-02-2006, 10:43 AM   #6
ncracraf
LQ Newbie
 
Registered: Sep 2006
Posts: 3

Original Poster
Rep: Reputation: 0
I primarily use Plesk control panel (version 8) to add or mofify crontab. I'm using Fedora 4, OS Linux 2.6.8-022stab067.1-enterprise.

I'm fairly new to Linux but have certainly had instances on Windows where services get "stuck". I'm just surprised that this would've happened with crontab on Linux since the server's just been so darn stable. Being a newbie I'm a little paranoid that something else might be going that caused the issue with crontab. But the site's humming and so are the cron jobs so maybe it just needed a good kick in the pants.

Thanks for the help and feedback.

NC
 
Old 09-02-2006, 03:44 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by w3bd3vil
in fedora core 5 you need to do that.
I call that a bug :}


Cheers,
Tink
 
  


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
How can I tell if crontab jobs are axecuting ? juanb Linux - General 4 01-27-2011 10:08 AM
LXer: Scheduling Backup Jobs using at and crontab LXer Syndicated Linux News 0 04-22-2006 02:24 AM
crontab jobs aren't running mdm_linux Linux - General 4 05-30-2005 01:27 PM
Extra cron jobs not in "crontab -e"? inspleak Linux - General 2 07-21-2004 10:47 PM
crontab doesnt works with all jobs. pxes351 Linux - Newbie 2 05-10-2004 02:11 AM


All times are GMT -5. The time now is 10:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration