Docker Ubuntu cron doesn’t work

Most probably:

  • cron service is not running
  • your cron-file in /etc/cron.d is not in file mode 0600
  • your cron-file in /etc/cron.d is not owned by root

To fix the above:

service cron start
chmod 0600 /etc/cron.d/<your file>
chown root /etc/cron.d/<your file>

If that does not work, install rsyslog on your container and debug:

apt-get update; apt-get install -y rsyslog
rsyslogd

Now keep track of your /var/log/syslog file. It will log all issues it receives from cron.

I found the answer here: https://stackoverflow.com/a/33734915

0 Shares
>