news-digest: per-instance cron schedule via env
Hardcoded crontab → render at container start from DIGEST_CRON_AM + DIGEST_CRON_PM. Defaults match the original 0800 / 2000 so existing deploys are no-ops. scripts/add-digest-user.sh learns --am and --pm flags so each teammate's stack can fire on their hours: scripts/add-digest-user.sh bob --am "0 6 * * *" --pm "0 17 * * *" scripts/add-digest-user.sh carol --pm "30 18 * * 1-5" # weekdays only Standard 5-field cron syntax; busybox crond honors the container's \$TZ. Removed the now-unused stacks/news-digest/crontab file and the matching COPY in the Dockerfile.
This commit is contained in:
@@ -40,7 +40,10 @@ COPY web.py /app/web.py
|
||||
COPY templates /app/templates
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY run-digest.sh /usr/local/bin/run-digest.sh
|
||||
COPY crontab /etc/crontabs/root
|
||||
# /etc/crontabs/root is written by entrypoint.sh from
|
||||
# DIGEST_CRON_AM/DIGEST_CRON_PM env at container start, so each
|
||||
# per-user instance gets its own schedule. Image no longer ships a
|
||||
# baked-in crontab.
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh /usr/local/bin/run-digest.sh
|
||||
|
||||
# Sentinel + first-run output dir
|
||||
|
||||
Reference in New Issue
Block a user