docker ubuntu cron -f is not working

后端 未结 1 1556
梦如初夏
梦如初夏 2021-02-08 03:33

Trying to run a cron job in a docker container. HAve a supervisord properly configured
(I see cron -f in the ps -ef and if I kill it it respawns)

1条回答
  •  青春惊慌失措
    2021-02-08 04:22

    You may want to check your crontab syntax; crontab files in places like /etc/crontab require an extra username field, for example:

    * * * * * root echo hi >> /root/test
    

    This is documented (not very prominently) in crontab(5):

    Jobs in /etc/cron.d/

    The jobs in cron.d and /etc/crontab are system jobs, which are used usually for more than one user, thus, additionally the username is needed....

    0 讨论(0)
提交回复
热议问题