How to install crontab on Centos

I am familiar with configuring the cron scheduler with the crontab -e command on my centos . But today I found that one of my centos servers does not have this command

I tried to install this with yum install crontab but no luck. Then I tried yum install crontabs and installed something

 ============================================================================= Package Arch Version Repository Size ============================================================================= Updating: crontabs noarch 1.10-11.el5 base 7.0 k Transaction Summary ============================================================================= Install 0 Package(s) Update 1 Package(s) Remove 0 Package(s) Total download size: 7.0 k Is this ok [y/N]: 

But still the crontab command does not work. If I do cat /etc/crontab , then it shows below

 SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 40 * * * * root run-parts /etc/cron.hourly 54 1 * * * root run-parts /etc/cron.daily 14 3 * * 0 root run-parts /etc/cron.weekly 38 1 16 * * root run-parts /etc/cron.monthly 

What should I do to have crontab on this particular server? I am using CentOS release 5.2 (Final) .

grep on cron shows:

 [root~]# ps -ef | grep cron root 24022 24001 0 19:07 pts/1 00:00:00 grep cron 

start cron service return:

 [root~]# service cron start cron: unrecognized service 
+46
linux cron crontab centos
Feb 15 '14 at 19:04
source share
1 answer

As shown in Install crontab on CentOS , the crontab package on CentOS vixie-cron . Therefore, install it with:

 yum install vixie-cron 

And then run it with

 service crond start 

To make it persistent so that it starts at boot, use:

 chkconfig crond on 



On CentOS 7, you need to use cronie :

 yum install cronie 

On CentOS 6, you can install vixie-cron , but the real cronie package cronie :

 yum install vixie-cron 

and

 yum install cronie 

In both cases, you get the same result:

 .../... ================================================================== Package Arch Version Repository Size ================================================================== Installing: cronie x86_64 1.4.4-12.el6 base 73 k Installing for dependencies: cronie-anacron x86_64 1.4.4-12.el6 base 30 k crontabs noarch 1.10-33.el6 base 10 k exim x86_64 4.72-6.el6 epel 1.2 M Transaction Summary ================================================================== Install 4 Package(s) 
+96
Feb 15 '14 at 19:31
source share
— -



All Articles