feat: persist OS-level cron jobs on Railway via supercronic - #11
Closed
tomfuertes wants to merge 1 commit into
Closed
tomfuertes wants to merge 1 commit into
tomfuertes wants to merge 1 commit into
Conversation
Crontab lives at /data/crontab on the persistent volume so jobs survive Railway redeploys; start.sh sources /data/.hermes/.env into supercronic so cron entries inherit the same secrets the gateway uses. Closes #10.
Contributor
Author
|
Superseded by NousResearch/hermes-agent#19709 — Hermes' built-in cron now supports |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10.
Summary
start.shnow sources/data/.hermes/.env, ensures/data/crontabexists, and launchessupercronic -passthrough-logs /data/crontabas a background sibling of the Hermes gateway./data/.hermes/cron/agent scheduler.Why this shape
/datais the only path that survives Railway redeploys, so the crontab itself has to live there. Putting the file at/data/crontabkeeps it separate from the Hermes-managed/data/.hermes/cron/agent jobs — clean ownership boundary.cron/cronddaemonizes itself, drops parent env, and writes through syslog — none of which composes withtinias PID 1 or Railway's stdout-based log pipeline. supercronic is a single static Go binary that runs in the foreground, inherits env, and prints to stdout.set -a; . /data/.hermes/.env; set +abefore launching supercronic lets cron entries reference the same secrets the gateway uses (SHIBARI_GITHUB_READONLY,SLACK_WEBHOOK_URL, etc.) without manual re-export.tini -g(already in theENTRYPOINT) signals the whole process group, so Railway's SIGTERM on redeploy reaches both supercronic and the gateway.Test plan
docker build -t hermes-agent .succeeds on amd64/data/crontab(no errors in logs)* * * * * dateline to/data/crontab, restart, verify per-minute output appears in Railway logs with[supercronic]prefix/data/.hermes/.env, verify the var is visible/data/crontabis preserved and jobs resume on the next tickcheck-ci.shexample, force a CI failure, confirm exactly one Slack notification fires