Cron & Scheduling
Cron & Scheduling System
Section titled “Cron & Scheduling System”Dewee includes an in-process cron scheduler (internal/cron/) supporting standard cron expressions and human-friendly interval strings like @every 24h or @every 30m.
Overview & Architecture
Section titled “Overview & Architecture”The scheduler manages two distinct classes of scheduled executions:
- Agent Scheduled Tasks: Dispatches user-configured prompts and workflow triggers to specific agents at scheduled intervals.
- Operator System Tasks: Runs recurring background jobs such as periodic memory consolidation, session compaction, and license status checks.
CLI Management Workflows
Section titled “CLI Management Workflows”# Create a daily summary cron taskdewee cron create --name "daily-standup" --schedule "@every 24h" --message "Summarize yesterday activities"
# List all active and paused cron jobsdewee cron list
# Inspect detailed status of a specific jobdewee cron get <job-id-or-name>
# Trigger immediate execution of a scheduled jobdewee cron run <job-id-or-name>
# Inspect execution history runsdewee cron runs <job-id-or-name>
# Enable or disable a jobdewee cron toggle <job-id> true
# Delete a scheduled jobdewee cron delete <job-id>Run Outcomes
Section titled “Run Outcomes”A run’s status says whether it executed (ok or error). Its outcome says what it achieved, so a run that executed but could not do its work never looks like a success:
| Outcome | Meaning |
|---------|---------|
| completed | The work was done |
| valid_skip | Nothing needed doing this time |
| blocked | The work cannot continue until someone acts (for example, an expired token) |
| incomplete | Part of the work was done; the rest remains |
| failed | The run failed |
The agent reports the outcome during the run through the cron tool (report_outcome with an outcome and a short reason). If it reports nothing, a run without an error is recorded as completed and a run with an error as failed. Agents whose tool profile has no cron tool (such as coding, messaging or minimal) are not asked to report and always get this default. Agents on CLI providers such as Claude CLI report through the same tool over the internal tool bridge. Credentials in the reason are redacted. A job that runs a workflow only queues it, so its runs show no outcome; the workflow run has its own status.
The outcome and reason appear in dewee cron list (OUTCOME column), dewee cron runs (OUTCOME and REASON columns), the dashboard cron pages and the workspace Schedules page. Runs from before this feature show no outcome.
Failure Recovery & Error Handling
Section titled “Failure Recovery & Error Handling”- If an agent is busy during scheduled execution, the task queues in the background event queue with exponential backoff.
- Failed executions log structured errors with trace correlation IDs visible via
dewee traces list.