LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cron not running (https://www.linuxquestions.org/questions/linux-software-2/cron-not-running-40893/)

Half_Elf 01-09-2003 03:36 PM

Cron not running
 
I have a little problem here. I have 2 box here, and I can't get cron tasks running on any one.
One box is running Slackware 8.0, so I just uncommented the "test cron" line (in /var/spool/cron/crontabs/root) that should touch a file in /tmp... but it never happen.

The second box is running Slackware 8.1, so I added a directory "cron.always" in /etc with a little bash script in it (the script should touch a file in /tmp, too) then I added the line * * * * * /etc/cron.always to /var/spool/cron/crontabs/root but nothing happen.

Is cron need a daemon to run? I have commented a lot of stuff in "rc.d" so I fear I have stopped something that should not be stopped. But I cannot find anything about a daemon in documentation :(

trickykid 01-09-2003 03:43 PM

Yah, you should have cron running !

Do a ps -aux or a ps -aux | grep crond and that should tell you if its running or not..

If its not, then make sure its not commented in the /etc/rc.d/rc.M or any other rc scripts.

Half_Elf 01-09-2003 07:33 PM

hum, crond is running (/usr/sbin/crond -l10 ) but my cron tasks are not doing anything... Strange...
What can be the bug?

speck 01-09-2003 10:20 PM

Have you tried typing "crontab -e" and then entering:

* * * * * echo `date` >> /tmp/tmp.txt

Save the new entry (you're in the vi editor) and then see if the date is being written to /tmp/tmp.txt.

Speck

Mik 01-10-2003 02:38 AM

Another thing you might want to pay attention to is that the tasks usually get started with a completely different environment. Depending on how cron is setup it won't even have the path variable set. So running a command like touch or date will just fail unless you give it the full path.
Do you get any messages in your log files that the tasks are even started? Or do they even fail to do that?
You might want to have a quick scan through the man pages of your cron daemon to find out exactly which files it uses. It varies for each cron daemon you use. I personally use fcron, I assume you are using the Vixie Cron one.


All times are GMT -5. The time now is 02:36 PM.