Issues running cron in Docker on different hosts

前端 未结 4 1235
谎友^
谎友^ 2020-12-15 03:56

Im trying to get a docker container running to mange my cronjobs

im running a very simple cron as a test in a docker container using centOS 6.5 base



        
4条回答
  •  没有蜡笔的小新
    2020-12-15 04:47

    In my case, I debug the cron:

    $ apt-get install rsyslog
    $ rsyslogd
    $ service cron restart
    $ tail -f /var/log/syslog
    

    And found NUMBER OF HARD LINKS > 1 error in logs.

    The solution was to put this in entrypoint.sh

    touch /etc/crontab /etc/cron.d/*
    

    and boom!

提交回复
热议问题