Skip to content

Instantly share code, notes, and snippets.

@liuchang0812
Created June 13, 2018 09:59
Show Gist options
  • Save liuchang0812/5c2277ff1b9b77035c0afa91668bfc8d to your computer and use it in GitHub Desktop.
Save liuchang0812/5c2277ff1b9b77035c0afa91668bfc8d to your computer and use it in GitHub Desktop.
testcron
* * * * * echo "hello world" >> /var/log/cron.log 2>&1
FROM ubuntu:14.04
MAINTAINER liuchang0812@gmail.com
ADD crontab /etc/cron.d/hello-cron
RUN chmod 0644 /etc/cron.d/hello-cron
RUN touch /var/log/cron.log
RUN /usr/bin/crontab /etc/cron.d/hello-cron
CMD tail -f /var/log/cron.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment