dev-migrate-supercronic #1

Merged
jblu merged 5 commits from dev-migrate-supercronic into main 2023-06-22 18:26:17 -05:00
3 changed files with 8 additions and 4 deletions
Showing only changes of commit c4ffcee3a3 - Show all commits

View File

@ -1,5 +1,5 @@
from alpine:latest from alpine:latest
RUN apk add --no-cache curl RUN apk add --no-cache curl,supercronic
COPY crontab opt COPY crontab opt
COPY entrypoint.sh opt COPY entrypoint.sh opt
COPY phc.sh opt COPY phc.sh opt

View File

@ -1 +0,0 @@
*/30 * * * * . /etc/environment; sh /opt/phc.sh >> /logfile

View File

@ -1,5 +1,10 @@
#!/bin/sh #!/bin/sh
CRON_CONFIG_FILE="/opt/crontab"
printenv | grep -v "no_proxy" >> /etc/environment # CRON
get_env CRON
CRON="${CRON:-"5 * * * *"}"
crond -f echo "${CRON} sh /opt/phc.sh" >> "${CRON_CONFIG_FILE}"
exec supercronic -passthrough-logs -quiet "${CRON_CONFIG_FILE}"