About Linux FAQ

Browse More FAQs:

Linux Start and stop the cron or crond service

Posted by Vivek Gite [Last updated: December 29, 2006]

Q. How do I start and stop the cron service?

A. Cron (crond) daemon or service is use to execute scheduled commands or scripts. cron wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute.

If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following commands.

Task: Start corn service

To start the cron service, use:
# /etc/init.d/crond start

Task: Stop corn service

To stop the cron service, use:
# /etc/init.d/crond stop

Task: Restart corn service

To restart the cron service, use:
# /etc/init.d/crond restart

If you are using Debian or Ubuntu Linux the following commands.

Task: Start corn service

To start the cron service, use:
# /etc/init.d/cron start
OR
$ sudo /etc/init.d/cron start

Task: Stop corn service

To stop the cron service, use:
# /etc/init.d/cron stop
OR
$ sudo /etc/init.d/cron stop

Task: Restart corn service

To restart the cron service, use:
# /etc/init.d/cron restart
OR
$ sudo /etc/init.d/cron restart

Task : Start the cron service at boot time

It is recommended that you start the service at boot time so that job can run w/o problems.

If you are using Redhat (RHEL)/Fedora Core/Cent OS Linux use the following commands to ensure that the service remains enabled after a reboot:
# chkconfig crond on
You can use text based GUI tool called ntsysv:
# ntsysv

If you are using Debian or Ubuntu Linux use the following commands to ensure that the service remains enabled after a reboot:
# rcconf
OPR
$ sudo rcconf
You can use command line tool update-rc.d:
# update-rc.d cron defaults
OR
$ sudo update-rc.d cron defaults

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.