Repository navigation
FactPack 0.2.0: the daily run recovers by itself
The daily run recovers by itself
Before, a run missed after the last fixed time slot was never retried. A network that came back at noon, or a Mac that restarted with nobody logged in, meant no brief that day.
Now a scheduler calls factpack run every 5 minutes. Each call asks one question, "is today's brief delivered?", and takes the next step if not: build, hold until delivery.send_at, or send. A call with nothing to do returns in about a second, so the first call after the machine and the network are back finishes the day.
- Backoff by kind of failure: network, sources, model account, configuration, delivery.
- One alert at a time: one when the brief is overdue, one when the day is given up (
schedule.give_up_at). Never one per retry. - Late editions say so: a brief that goes out more than 30 minutes late says so at the top, with the reason: "⏰ 2h 15m late today (network outage)".
- Stuck runs are stopped: a run stuck past
schedule.max_run_minis stopped by the next call. - Optional outside check:
monitoring.heartbeat_url(Healthchecks.io-compatible) tells you when no brief went out, even if the machine is off.
uv tool install factpack
factpack schedule install # macOS: launchd agent; Linux: systemd user timer (Persistent=true)
factpack doctor # scheduler, sleep, restart after power loss, FileVault vs automatic login, disk, network, key, channelsKeys can go in <instance>/.env (chmod 600), so the scheduled job holds no secrets. Guide: docs/deployment.md.
Also in 0.2.0
- Delivery to Feishu/Lark, WeCom (企业微信) and DingTalk group bots, with optional signing. Messages are split to each bot's size limit.
- Run without a server on GitHub Actions: fork the repo, add your secrets, and the brief arrives every morning. Three catch-up runs cover late or dropped schedules. Guide: docs/github-actions.md (中文).
factpack send-testsends one test message to every enabled channel.- More settings from the environment:
FACTPACK_DELIVERY,FACTPACK_LANGUAGE,FACTPACK_TIMEZONE,FACTPACK_RSSHUB_URL,FACTPACK_SEND_ATandFACTPACK_PREPARE_AT.
Full list: CHANGELOG.md.