HostOnNet Blog


CentOS crontab: command not found

On a CentOS server, when setting up cron job, i got following error.

[root@hostonnet ~]# crontab -e
-bash: crontab: command not found
[root@hostonnet ~]#

This is because cronie package not installed. To fix, run

yum install cronie

Now you need to set crond daemon to start on boot.

chkconfig --add crond
chkconfig crond on

Now verify crond will start on boot, you need to look for 3:on

[root@hostonnet ~]# chkconfig --list crond
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@hostonnet ~]# 

Start crond with

service crond start
[root@hostonnet ~]# service crond start
Starting crond:                                            [  OK  ]
[root@hostonnet ~]# 

Posted in CentOS