Repository navigation
feat(schedule): cron parser, ScheduleStore and scheduler config defaults - #215
Merged
Merged
Conversation
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
|
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
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.
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,@dailyaliases), presets,every/atshapes, IANA or local tz throughzoneinfo. No new dependency.services/schedule_store.py: machine-wide store under~/.c3/oraclefor schedules, runs and an events audit.claim_dueadvancesnext_run_atin 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_*andmobile_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