LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-09-2003, 03:36 PM   #1
Half_Elf
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
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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
Half_Elf
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
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
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
 
Old 01-10-2003, 02:38 AM   #5
Mik
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:56 PM.

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
Open Source Consulting | Domain Registration