HostOnNet Blog

CentOS crontab: command not found

Looking for Linux Server Admin or WordPress Expert? We can help.

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

[[email protected] ~]# crontab -e
-bash: crontab: command not found
[[email protected] ~]#

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

[[email protected] ~]# chkconfig --list crond
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[[email protected] ~]# 

Start crond with

service crond start
[[email protected] ~]# service crond start
Starting crond:                                            [  OK  ]
[[email protected] ~]# 

Posted in CentOS

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.