Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Scheduled (recurring) tasks with an unattended-work admission policy
Context
Every ProPR run starts from a GitHub event (label, slash command, check run), the UI, the CLI, a REST task submission or MCP. There is no way to say "every night, run this instruction against this repository" (e.g. a dependency/upgrade patrol, a flaky-test hunt, a docs drift check, or a nightly /review of open PRs). A grep for cron/recurring in packages/ and src/ finds nothing.
Requirements
- Schedule definitions stored in the DB and managed via Settings UI,
propr schedule add|list|remove|run-now, and MCP (create_schedule,list_schedules,run_schedule_now). Fields: repository, cron expression + IANA timezone, instruction (same shape as a REST task submission: text, agent/model override,runUltrafix,autoMerge,maxCostUsdwhen the spend-cap issue lands),enabled,owner(the user who created it),last_run_at,next_run_at. - Dispatch: a daemon tick (follow the existing daemon loops in
src/daemon/) that acquires a Redis lease, finds due schedules, and creates a task through the same code path as a REST task submission (packages/api/routes/taskSubmissionRoutes.tslogic refactored into a shared service if needed) with an idempotency keyschedule:<id>:<slot>so a tick that runs twice cannot dispatch twice. Missed slots during downtime are not replayed; a newly created schedule never fires for a slot in the past. - Unattended-work admission: instance settings
unattended_max_concurrent(default 1) and optionalunattended_window(e.g.02:00-07:00@Europe/Riga). Scheduled runs (and, when they exist, CI-failure follow-ups and replacement runs flagged as automatic) are admitted only when the number of running unattended tasks is below the cap and the current local time is inside the window; otherwise the slot is skipped with a timeline/notification entry. Manual runs are exempt. A malformed window blocks unattended work rather than allowing it, with a visible warning in Settings. - Provenance: tasks created by a schedule carry
schedule_idand show "Scheduled: " in task lists, task detail, the Inbox notification and the GitHub issue body (the issue is created the same waycreate_taskcreates one today). - Safety: a schedule whose last 3 consecutive runs failed is paused automatically with a notification;
run-nowre-enables it.
Documentation
- New page
docs/docs/features/scheduled-tasks.md; links from the features overview and the CLI reference;docs/docs/operations/settings-locations.mdfor the admission settings. - CHANGELOG.md Unreleased entry.
Tests
- Cron/next-run computation with timezones and DST; no replay of missed slots; no first-fire in the past.
- Idempotent dispatch across two ticks.
- Admission: cap and window honoured; malformed window blocks; manual runs unaffected.
- Auto-pause after 3 failures and re-enable via run-now.
- Run
npm run lint,npm run typecheckand the affected suites.
From the Warren comparison (2026-10-06); planned for batch 4. Batch 1 is #2734, #2735, #2736.
Activity
propr-dev commentedon Oct 6, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-52744/claude-opus-5-5-scheduled-recurring-tasks-20261006-2103-b7xmainissue-2744-20261006-2103-claude-opus-5-5-b7x🔍 Track Task Execution
Scheduled (recurring) tasks with the unattended-work admission policy (…
integry commentedon Oct 6, 2026
Superseded by the Agents v1 epic (#2800–#2816): cron schedules (#2811), unattended cost gate (#2810) and a single trigger primitive (#2803). The two pieces the epic lacks — an unattended concurrency cap and a local-time window — are tracked in a follow-up issue.