How to install crontab on Centos

前端 未结 1 599
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 02:23

I am familiar to setup the cron scheduler using crontab -e command on my centos. But today I found one of my centos servers doesn\'t have

相关标签:
1条回答
  • 2021-01-30 02:34

    As seen in Install crontab on CentOS, the crontab package in CentOS is vixie-cron. Hence, do install it with:

    yum install vixie-cron
    

    And then start it with:

    service crond start
    

    To make it persistent, so that it starts on 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 package is cronie:

    yum install vixie-cron
    

    and

    yum install cronie
    

    In both cases you get the same output:

    .../...
    ==================================================================
     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)
    
    0 讨论(0)
提交回复
热议问题