You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(docker): scheduled reminders via supercronic + --deliver
Add in-container scheduling so the dockerized agent can fire reminders on a
cron schedule and deliver results to Telegram — without a host crontab.
Why supercronic over crond: classic crond scrubs the environment from its
jobs (so env_file vars like ODEK_API_KEY / the bot token never reach a tick)
and wants root to setuid, clashing with the non-root container user.
supercronic runs as the normal user and passes its own environment to each
job, so a scheduled `odek run --deliver` sees exactly what the bot sees.
- Dockerfile: install supercronic v0.2.46, pinned by SHA-256 computed from the
official release assets (arch-aware via TARGETARCH); add a cron-entrypoint.sh
wrapper that starts supercronic only when a crontab is mounted, then execs
odek (PID-1 semantics, signals, and the Telegram lock unchanged).
- compose: mount ./crontab into both telegram profiles.
- telegram config: read ODEK_TELEGRAM_DEFAULT_CHAT_ID from env (was config-file
only), so --deliver's target chat can live in .env like everything else.
- docs + .env.example: document reminders and the new env var.
E2E verified (build + run): supercronic SHA-256 checks out, a cron job inside
the container inherits an injected env var, and the no-crontab path still runs
odek unchanged. Unit tests cover the new env-var parsing (incl. negative IDs).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments