Created
December 24, 2015 19:07
-
-
Save andyshinn/3ae01fa13cb64c9d36e7 to your computer and use it in GitHub Desktop.
BusyBox cron container example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gliderlabs/alpine:3.3 | |
COPY myawesomescript /bin/myawesomescript | |
COPY root /var/spool/cron/crontabs/root | |
RUN chmod +x /bin/myawesomescript | |
CMD crond -l 2 -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Hi Andy" >> /dev/stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* * * * * /bin/myawesomescript |
Whoa... You mean this thread, my comment, spawned a patch upstream to BusyBox?! Niiiiiiice. Thanks @jsarenik !
@eduncan911 My pleasure :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been looking & this is the most information I can find about this...
for the
crond -fbS -l N -d N -L LOGFILE -c DIR
it says-l
has options from 0 to at least 8 with 0 giving the most detail, it then has-d
that maybe has the same scale, but is it -d=log to stderr? so, for example if I rancron -fbS -l 2 -d 0 -L /var/log/cron.log
would it log to the foreground, background, & syslog with level 2 & log to STDERR with verbose log (0) while logging what to/var/log/cron.log
? Would it be the level set as-l
?