LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Crontab not running jobs (https://www.linuxquestions.org/questions/linux-newbie-8/crontab-not-running-jobs-479583/)

ncracraf 09-01-2006 07:18 PM

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

w3bd3vil 09-01-2006 07:32 PM

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.

ncracraf 09-01-2006 11:46 PM

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

Tinkster 09-02-2006 12:40 AM

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



Cheers,
Tink

w3bd3vil 09-02-2006 07:52 AM

in fedora core 5 you need to do that.

ncracraf 09-02-2006 09:43 AM

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

Tinkster 09-02-2006 02:44 PM

Quote:

Originally Posted by w3bd3vil
in fedora core 5 you need to do that.

I call that a bug :}


Cheers,
Tink


All times are GMT -5. The time now is 01:54 PM.