Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-09-2003, 03:36 PM   #1
LQ Guru
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
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
Old 01-09-2003, 03:43 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 254Reputation: 254Reputation: 254
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.
Old 01-09-2003, 07:33 PM   #3
LQ Guru
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Original Poster
Rep: Reputation: 46
hum, crond is running (/usr/sbin/crond -l10 ) but my cron tasks are not doing anything... Strange...
What can be the bug?
Old 01-09-2003, 10:20 PM   #4
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 363

Rep: Reputation: 107Reputation: 107
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.

Old 01-10-2003, 02:38 AM   #5
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
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.


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
cron jobs not running scarr3d Linux - Software 7 05-25-2004 04:21 PM
running apt-get in cron firefly2442 Debian 2 04-29-2004 10:50 PM
Cron stopped running? willemdebeer Linux - Newbie 1 01-02-2004 01:33 PM
Cron job not running? james_cwy Linux - Newbie 6 12-14-2003 08:24 PM
running X programs with cron NGraphiX Linux - General 5 12-27-2002 01:21 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration