Skip to content

feat(schedule): cron parser, ScheduleStore and scheduler config defaults - #215

Merged
drknowhow merged 2 commits into
mainfrom
feat/scheduled-tasks-store
Oct 13, 2026
Merged

drknowhow merged 2 commits into
mainfrom
feat/scheduled-tasks-store

Conversation

@drknowhow

Copy link
Copy Markdown
Owner

First of the Scheduled Tasks series (plan: Oracle-hosted runner, c3_schedule, Hub and Desk tabs).

  • services/cron_expr.py: 5-field cron (lists, ranges, steps, names, @daily aliases), presets, every/at shapes, IANA or local tz through zoneinfo. No new dependency.
  • services/schedule_store.py: machine-wide store under ~/.c3/oracle for schedules, runs and an events audit. claim_due advances next_run_at in the same locked transaction that writes the run row, so a claimed row is never due twice; one-shots are disabled at claim.
  • oracle/config.py: scheduler_* and mobile_schedules_* defaults only.

Nothing reads the store yet. 42 tests, including single-claim across four threads and three processes.

https://claude.ai/code/session_01JUcvmQq81aLo9ewD9Xc4qY

Adds services/cron_expr.py (5-field cron, presets, every/at shapes, tz via
zoneinfo, no new dependency) and services/schedule_store.py, a machine-wide
store under ~/.c3/oracle for scheduled tasks and their runs. claim_due
advances next_run_at inside the same locked transaction that writes the run
row, so a row stops being due the moment any process claims it; one-shots are
disabled at claim. Nothing reads the store yet; Oracle config only gains the
scheduler_* and mobile_schedules_* defaults. Verified: 42 tests incl.
cross-thread and cross-process single-claim.

Claude-Session: https://claude.ai/code/session_01JUcvmQq81aLo9ewD9Xc4qY
@groyep

groyep Bot commented Oct 13, 2026

Copy link
Copy Markdown

Gro could not finish this review.

Windows ships no IANA database, so ZoneInfo("America/New_York") raised
ZoneInfoNotFoundError on the windows-latest CI matrix. The marker keeps
Linux and macOS installs unchanged.

Claude-Session: https://claude.ai/code/session_01JUcvmQq81aLo9ewD9Xc4qY
@drknowhow
drknowhow merged commit dbdee90 into main Oct 13, 2026
12 checks passed
@drknowhow
drknowhow deleted the feat/scheduled-tasks-store branch October 13, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant