Repository navigation
Scheduled tasks: file-based config in the repo, with a CLI to export and apply #31997
TechFeatured
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/server (scheduled tasks), CLI
Problem or use case
Scheduled tasks exist only in each environment's local state (
statev2.sqlite, thescheduled_taskstable). Their prompt, cadence, model and workspace strategy can be edited only in the Schedules UI or through theschedule_taskMCP tool, andt3has noschedulesubcommand. For a team that runs a handful of recurring agent jobs from one repo, that causes three problems:schedule_taskon the new environment, the project needed a default model first, and the time zone had to match ortimeOfDaymeant a different hour. Nothing could be exported or applied.ThreadManagementProviderInstanceDisabledError). Nothing showed it until its next run failed.Our workaround is to keep each prompt in the repo (
.claude/schedules/<name>.md) and set the T3 prompt to "Follow.claude/schedules/<name>.mdin this checkout", since every run starts in a fresh worktree fromorigin/main. That covers the prompt, but cadence, model and workspace strategy still live only in T3.Proposed solution
Let a project declare schedules in files, the way it declares scripts:
enabledtoggle is kept per environment, so pausing a job doesn't need a commit.t3 schedule list | export [--project] | apply <dir> [--dry-run].exportwrites the current schedules out as files, which makes adopting this and moving to another machine one command each.timeZoneper schedule, so afixed_timeschedule means the same hour on every machine. scheduler: scheduled task times shown in UTC instead of local/system time (IST) #18632 is related.Why this matters
Recurring agent jobs are becoming real production work: publishing, abuse sweeps, reports emailed to people. They need the same things as other automation: review, history, rollback and a way to move between machines. Keeping them in the repo next to the skills and scripts they call stops the prompts drifting from the code.
Alternatives considered
All reactions