14

I have a server running CentOS 6.2 minimal, but it doesn't appear to have crontab installed by default?

crontab -e
-bash: crontab: command not found

In searching google, I found references to a "vixie-cron" and "anacronda" but no complete answer on what the official/supported way of getting cron to work on CentOS 6 is.

Maybe someone can shed some light on this?

update:

rpm -qf `which crontab`
/usr/bin/which: no crontab in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
rpm: no arguments given for query
Nick
  • 4,503
  • 29
  • 69
  • 97
  • 2
    You can't `which` something that doesn't exist on your host. I think what you are looking for is `yum provides */crontab`. – Aaron Copley Aug 09 '12 at 22:40

1 Answers1

17
# rpm -qf `which crontab`
cronie-1.4.4-7.el6.x86_64

Vixie-cron was replaced with Cronie in EL6. Likely it wasn't installed in your "minimal" installation; they really do strive to be minimal with it.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thanks, `yum install cronie` seems to have done the trick. Do you know how to set which editor `crontab -e` uses by default? – Nick Aug 09 '12 at 22:42
  • 1
    That's a separate question. [Read it here](http://serverfault.com/q/197741/126632). – Michael Hampton Aug 09 '12 at 22:57
  • 4
    It looks like I also have to do `service crond start` and `chkconfig crond on`, regarding this question. Thanks for the other answer, got it working. – Nick Aug 09 '12 at 23:22