Linux Start Restart and Stop The Cron or Crond Service

Posted on in Categories , , , , , , , last updated May 19, 2015

How do I start, restart and stop the cron service under a Linux / BSD / UNIX-like operating systems using command prompt?

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.
Linux Start Restart and Stop The Cron or Crond Service

Commands for RHEL/Fedora/CentOS/Scientific Linux user

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

Task: Start cron service

To start the cron service, use:
# /etc/init.d/crond start
OR RHEL/CentOS 5.x/6.x user:
# service crond start
OR RHEL/Centos Linux 7.x user:
# systemctl start crond.service

Task: Stop cron service

To stop the cron service, use:
# /etc/init.d/crond stop
OR RHEL/CentOS 5.x/6.x user:
# service crond stop
OR RHEL/Centos Linux 7.x user:
# systemctl stop crond.service

Task: Restart cron service

To restart the cron service, use:
# /etc/init.d/crond restart
OR RHEL/CentOS 5.x/6.x user:
# service crond restart
OR RHEL/Centos Linux 7.x user:
# systemctl restart crond.service

Commands for Ubuntu/Mint/Debian based Linux distro

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

Task: Debian Start cron service

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

Task: Debian Stop cron service

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

Task: Debian Restart cron service

To restart the cron service, use:
# /etc/init.d/cron restart
OR
$ sudo /etc/init.d/cron restart
OR
$ sudo service 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 a text based GUI tool called ntsysv to enable crond service:
# ntsysv

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

21 comment

  1. Hi,
    i need to set classpath env variable for the scripts run by cron. i tried using bashrc, but it didnt work.. can anyone help me in this?

  2. hello,
    i have cron.php file and i want run this script in every 10 minut . my file directory structure is /var/www/html/.
    so any one help me

    1. Cron runs in a santized environment so always use full paths to run scripts:
      */10 * * * * /usr/bin/php /var/www/html/cron.php

  3. got a mail server setup using Fedora Core 2. A power outage occured which unfortunately the UPS didnt hold. errors generated when start up;
    ***An error occured during the file system check. Dropping you to a shell; the system wll reboot when you leave the shell. Give root password for maintanance (or type Control -D to continue)

    After rebooting this is what happened;

    setting up Logical Volume Management: /dev/hdc: open failed: No medium found (FAILED)

    Can you point me in the right direction please?

  4. I think you corrupted your / partition ,try to run e2fsck command if this doesnt work ,use linux rescue and check all entries in /etc/fstab and verify whether it is correct

  5. Im so glad i read the comments!!!!!!!

    MUST USE:
    sudo service cron [restart|start|stop]

    Why not update this page or at least state that its old version!!! wasted hours with old cron and crond …. happy now though.

  6. http://serverfault.com/a/532121

    As crontab don’t do the job, you’ll to manipulate it’s content :

    crontab -l | grep -v ‘^#’ | cut -f 6- -d ‘ ‘ | while read CMD; do eval $CMD; done

    What it does :

    lists crontab jobs
    remove comment lines
    remove the crontab configuration
    then launch them one by one

  7. Below commands really resolved my issue of cron job
    o restart the cron service, use:
    # /etc/init.d/cron restart

    OR
    $ sudo /etc/init.d/cron restart

Leave a Comment