CRONTAB does not run since reboot


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users CRONTAB does not run since reboot
# 1  
Old 08-30-2007
CRONTAB does not run since reboot

Hi,
we reboot our Linux server yesterday and since then (specialy last night) no job from crontab has run. Any idea ? What should I look for to investigate?

Many thanks.
# 2  
Old 08-30-2007
one of the first things to do is check if the cron daemon is running or not. cron daemon is the process that runs in the background and schedules all cron jobs for execution.
# 3  
Old 08-30-2007
thank you. How ? I did this :
ps -ef | grep cron

I have nothing from that.
# 4  
Old 11-08-2008
Many a times after reboot, machines have a problem with cron job.

Machine : Linux

Solutions:

This problem can be solved by editing, or removing then "reentering" the cronjobs again after Reboot using crontab -e.

or

I suppose you will be using crontab -e to edit the cron jobs.

You can use Cronnix to edit cron files. So whenever you restart your machine it will reenter all those jobs automatically.

or

After Reboot, if the cronjob is not running,
One can do

sudo /etc/init.d/cron restart

Logs can be seen in anyone of the two

/var/log/auth.log
/var/log/syslog.


Try this and let me know your observation.

Hope this will clear the problem.
# 5  
Old 11-08-2008
Check the process after Reboot

Check the Process of cron. You will end up like this.

ps -eaf | grep cron.

root 12357 1 71 sep 02 - 3123:27 /usr/sbin/cron
root 561644 598403 0 10:03:59 pts/0 0:00 grep cron

Run the below command as ROOT.

sudo /etc/init.d/cron restart.

Thanks
Murugan
# 6  
Old 11-08-2008
check the /var/cron/log for more clues I dunno what's the equivalent on linux.

Have you checked if there are other user cronjobs are running? if there are but that particular user cronjob not running could be that password aging has disabled that user, so if userid disabled cronjob will not fire, to enable just give it a new password - at least this happens on sun solaris - not sure abt linux tho.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a script before and after reboot automatically and send output to two locations.

Hello Team . I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are 1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ? 2. The same... (2 Replies)
Discussion started by: Varja
2 Replies

2. Shell Programming and Scripting

Can't get my crontab to run

I'm trying to get a crontab to run, every Friday at 11am and the problem is that it isn't running at all. 0 11 * * 6 /Users/martinb/Documents/SYSADMIN/Regular-Scripts/Info-And-Backups.sh Here's a link to a screenshot of my script (I've censored my email address). Screen Shot 2017 11 03... (3 Replies)
Discussion started by: $shell_Learner
3 Replies

3. Shell Programming and Scripting

Script to Run Multiple Systems Checks and mail me the results after every reboot- Linux

Hello, I'm trying to create a mechanism wherein a set of Production servers will email me the results of system checks like Uptime, NFS Mounts and a Process after every scheduled reboot. For this, I figured I'd use the @reboot parameter that crond comes with. I have added the below onliner... (3 Replies)
Discussion started by: pocodot
3 Replies

4. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

5. Shell Programming and Scripting

How to run script automatically on reboot as root user?

Hi friends,,, I am running one server on Ubuntu 12.04 LTS 32-bit, some times my pc restarts automatically, with no reason, I have a script to start server which requires root password. in this directory /myserver/start_server.sh How can I do this ? and some scripts I am having that I... (1 Reply)
Discussion started by: Akshay Hegde
1 Replies

6. HP-UX

Old crontab file reflected after server reboot

Hi All, We are working on HP_UNIX. I am facing a strange problem regarding crontab in our unix environment.Whenever a server reboot takes place on our server the old crontab gets reflected due to which several scripts which were earlier uncommented starts running causing a huge problem .Is... (6 Replies)
Discussion started by: ammbhhar
6 Replies

7. Solaris

Slow run processes after abnormal reboot

hi all, I'm working Solaris 5.10 (5.10 Generic_137137-09 sun4u sparc SUNW,SPARC-E nterprise) Few days ago, my junior engineer made a mistake! He is execute shutdown command on the live server. He mis understand between live and test servers! :wall: The live... (0 Replies)
Discussion started by: buyantugs
0 Replies

8. UNIX for Dummies Questions & Answers

What crontab is in effect after reboot

A basic cron question and I hope I explain it enough. If a person creates a file to use with cron and issues the followin command: crontab I understand this will set the cron entries to whatever is in . However, if we now edit the crontab with: crontab -e and save, how does cron... (3 Replies)
Discussion started by: niswonp
3 Replies

9. Solaris

crontab to run every 20 second

Hi experts, I want to set the crontab for my script which will run every 20 seconds I think below could be the possible one- */3 * * * * /export/home/username/scripts/runing.sh As my system(SOLARIS 9) is live- i am confused to implement before make sure !!! I need... (4 Replies)
Discussion started by: thepurple
4 Replies

10. Linux

Run a script during reboot/startup

Hi all, i have a script in /etc/init.d directory. -rwxr-xr-x 1 root root 26 Mar 28 16:00 myscript I need it to run when my linux reboots/startup. However is it not being executed. Do i need to put in in the rc.local directory? (1 Reply)
Discussion started by: new2ss
1 Replies
Login or Register to Ask a Question