ac-scheduled-jobs
Designing and diagnosing work that runs on a schedule rather than on request: run semantics when a trigger is missed, at-least-once delivery and idempotent job bodies, singleton execution and the lock that prevents overlaps, long-run and overdue jobs, backfill and catch-up after downtime, monitoring liveness versus completion, and the written schedule record. It explains the semantics of time-triggered work; it never recommends a scheduler and never treats silence as success. Use when asking "cron job", "scheduled job", "missed run", "job overlap", "singleton lock", "catch up after downtime", "backfill schedule", "why didn't the 9am job run", "job still running", "at least once job". Not for multi-step durable workflows (ac-durable-execution), not for queue delivery to endpoints you don't own (ac-webhook-and-async-delivery), not for CI pipeline scheduling (ac-ci-and-release).
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- ac-scheduled-jobs
- status
- seedling
- license
- MIT
- metadata
- { "domain": "software-engineering" }
- description
- Designing and diagnosing work that runs on a schedule rather than on request: run semantics when a trigger is missed, at-least-once delivery and idempotent job bodies, singleton execution and the lock that prevents overlaps, long-run and overdue jobs, backfill and catch-up after downtime, monitoring liveness versus completion, and the written schedule record. It explains the semantics of time-triggered work; it never recommends a scheduler and never treats silence as success. Use when asking "cron job", "scheduled job", "missed run", "job overlap", "singleton lock", "catch up after downtime", "backfill schedule", "why didn't the 9am job run", "job still running", "at least once job". Not for multi-step durable workflows (ac-durable-execution), not for queue delivery to endpoints you don't own (ac-webhook-and-async-delivery), not for CI pipeline scheduling (ac-ci-and-release).
02 资源文件 10
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md373 B
- 参考文档subskills/catchup-and-backfill.md2.9 KB
- 参考文档subskills/idempotent-job-bodies.md2.9 KB
- 参考文档subskills/liveness-monitoring.md3.0 KB
- 参考文档subskills/long-running-and-overdue.md3.3 KB
- 参考文档subskills/missed-run-semantics.md3.1 KB
- 参考文档subskills/overlap-and-singleton.md2.9 KB
- 参考文档subskills/schedule-record.md3.1 KB
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Scheduled jobs
Overview
A scheduled job is work that starts because the clock says so, not because a user asked. That single difference creates every problem this skill covers: nobody is watching when it runs, the trigger can be missed while the system is down, two instances can fire at once, and a job that silently stops running produces no error at all — only an absence that surfaces weeks later as stale data.
The central design decision is run semantics: when a trigger time is missed, does the job run late, run once, skip, or run twice? The answer must be chosen deliberately rather than inherited from a scheduler's default, because it decides what the system guarantees after every restart, deploy, and outage. The second decision is idempotency: schedule delivery is at-least-once in practice, so the body must tolerate running twice — or running while the previous run is still going.
Primary sources: https://www.rfc-editor.org/rfc/rfc3339 and https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/.
When to use
- Designing cron-style jobs and their behaviour on restart, overlap, or downtime.
- Diagnosing jobs that did not run, ran twice, or never stopped running.
- Deciding catch-up semantics after an outage window.
- Building liveness monitoring for time-triggered work.
When NOT to use
- For multi-step workflows with compensation (use ac-durable-execution).
- For webhook delivery outward (use ac-webhook-and-async-delivery).
- For CI scheduled pipelines (use ac-ci-and-release).
Subskill Index
| Leaf | Domain segment | Scope (one line) |
|---|---|---|
subskills/missed-run-semantics.md |
software-engineering/missed-run-semantics |
What happens when a trigger time passes while the system is down or busy. |
subskills/overlap-and-singleton.md |
software-engineering/overlap-and-singleton |
The lock that keeps one run at a time, and what happens when it is held. |
subskills/idempotent-job-bodies.md |
software-engineering/idempotent-job-bodies |
Writing a job body that is safe to run twice, in order, at the wrong time. |
subskills/long-running-and-overdue.md |
software-engineering/long-running-and-overdue |
Jobs that outlive their interval, and the queue of missed triggers behind them. |
subskills/catchup-and-backfill.md |
software-engineering/catchup-and-backfill |
What runs after downtime: catch-up policy and bounded replay. |
subskills/liveness-monitoring.md |
software-engineering/liveness-monitoring |
Detecting a job that stopped without erroring — dead-man's-switch design. |
subskills/schedule-record.md |
software-engineering/schedule-record |
The written record: every job, its trigger, semantics, and owner. |
Status and honest limits
Scheduler behaviour on missed triggers is implementation-specific: some run once, some run every missed instance, some skip — this skill frames the decision but the deployed scheduler's own documentation is the authority on which options exist. Nothing recommends a product, and the hardest failure in this class is invisible: a job removed by mistake produces no alert, only an absence. Every design here assumes that silence is a signal to be monitored, not evidence of health.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.