-
-
Save andyshinn/3ae01fa13cb64c9d36e7 to your computer and use it in GitHub Desktop.
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 |
#!/bin/sh | |
echo "Hi Andy" >> /dev/stdout |
* * * * * /bin/myawesomescript |
Lol wow. Wonder how many people's workflows are going to break because of this ๐
Lol wow. Wonder how many people's workflows are going to break because of this
Haha :) Should be pretty backward-compatible since the hidden files are still ignored (though were not in my originally proposed patch, but luckily we have peer-review :-)
But I assume lots of people's workflows are based on the fact that files with a .
in the filename are not executed ๐
Whether they know that or not
But I assume lots of people's workflows are based on the fact that files with a
.
in the filename are not executed Whether they know that or not
Yes. And with the patch it works exactly like you say. Just that also file.sh
gets executed now (despite the dot).
Yeah bud, file.sh
is exactly what I was talking about
Yeah bud,
file.sh
is exactly what I was talking about
Do you really think people know file.sh
will not be executed ? Moreover not executed on Alpine but executed on Debian ?
I'm unfortunately for me - and the time I spent - not part of these people.
Try crond --help:
/ # crond --help BusyBox v1.24.2 (2016-06-22 17:51:28 GMT) multi-call binary. Usage: crond -fbS -l N -d N -L LOGFILE -c DIR -f Foreground -b Background (default) -S Log to syslog (default) -l N Set log level. Most verbose:0, default:8 -d N Set log level, log to stderr -L FILE Log to FILE -c DIR Cron dir. Default:/var/spool/cron/crontabs
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 ran cron -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
?
Whoa... You mean this thread, my comment, spawned a patch upstream to BusyBox?! Niiiiiiice. Thanks @jsarenik !
@eduncan911 My pleasure :)
Ah yes, totally in
run-parts
. Here is a patch:To test:
Planning to send it upstream as soon as I refresh memories of how things are properly done on the mailing list.
UPDATE: Patch sent to the busybox mailing-list and I used exactly this original git documentation.
UPDATE: Patch merged in
8c1f8aa01
.This patch is tested (with busybox@7de0ab21d) and works.