How to install crond/crontab on CentOS/RHEL servers?

The daemon crond is pre-installed in almost all servers. In some rare situations, we need to install it manually on our servers. Here I’m going to explain the steps to install cron daemon on CentOS and RHEL servers. We all know ‘What is crond?’ and its importance in servers. The daemon crond is using for job scheduling.

Crontab is the program used to install, remove or list the tables used to drive the cron daemon. Cronjobs are predefined jobs which are running periodically according to the settings we have done previously. In the /etc folder there is a file called crontab where we can write the command or name of the script that is to be executed at as per our customized time. You can refer the link pasted below to schedule jobs using crontab.

Linux Job Scheduling Using Crontab

Calendar out of dates

How to check whether it’s already installed on the server?

Yeah.. This is important to check if it’s installed, before going to start the installation steps. We can check this by using the following commands:

rpm -qa|grep cron

Sample result:

[[email protected] ~]$ rpm -qa|grep cron

Installation steps – for CentOS/RHEL 6

This is how I install crond onto my CentOS server edition as it doesn’t seem to come preinstalled, this might not be true for other distributions and the following command may not work for all distributions.

Execute the following command:

yum -y install vixie-cron crontabs

And then start it with:

/sbin/service crond start

To start the daemon on boot, add it to chkconfig:

chkconfig crond on

That’s it dude!!

Hey, I have a CentOS 7 / RHEL 7 server. How can I enable crond on it?

On CentOS 7 vixie-cron is not longer available, so you need to use cronie to install cron daemon on this server. Please use the following command to install crond on CentOS 7 server:

yum install cronie

That’s it!!

Let me know if you’ve any questions!

Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *