Field-level reference for scheduled tasks: cron expression syntax, storage location, execution limits, and auto-expiration rules
Scheduled tasks allow Qoder CLI to automatically trigger a prompt or slash command at specified times. This page explains the cron expression format, storage location, and execution limits. For a usage guide on scheduled tasks, see Scheduled Execution Task.
Scheduled tasks use standard 5-field cron expressions, interpreted in the Local Time Zone where the CLI is running:
Supported field syntax:
Persistent scheduled tasks are saved in the
Task fields:
cron expression format
Scheduled tasks use standard 5-field cron expressions, interpreted in the Local Time Zone where the CLI is running:
| Syntax | Meaning | Example |
|---|---|---|
* | Wildcard, matches all | * * * * * (every minute) |
N | Single value | 0 9 * * * (9:00 every day) |
*/N | Step, every N units | */15 * * * * (every 15 minutes) |
N-M | Range | 0 9-17 * * * (every hour from 9 to 17) |
N,M,... | List | 0 9,12,18 * * * (at 9, 12, and 18 every day) |
Common examples:L,W,?, and name aliases are not supported. When both day of month and day of week are restricted, an "OR" semantics is applied—triggering if either matches (standard cron behavior).
| Expression | Meaning |
|---|---|
*/10 * * * * | Every 10 minutes |
0 * * * * | Every hour on the hour |
0 9 * * * | 9:00 every day |
0 9 * * 1-5 | 9:00 on weekdays |
0 0 */2 * * | 0:00 every 2 days |
Storage Location
Persistent scheduled tasks are saved in the .qoder/scheduled_tasks.json under the project. File format:
| Field | Description |
|---|---|
id | 8-character hexadecimal task identifier. |
cron | 5-field cron expression. |
prompt | Prompt text or slash command queued upon trigger. |
createdAt | Creation timestamp (milliseconds). |
lastFiredAt | Last trigger timestamp (milliseconds, written back for recurring tasks). |
recurring | Whether it is a recurring task. |
Task Types
- One-time task (
recurringis false or omitted): Automatically deleted after a single trigger. - Recurring Task (
recurring: true): Triggered repeatedly on a cycle, rescheduled from the current time until explicitly deleted or automatically expired.
Execution Limits and Expiration
- Maximum number of tasks: Up to 50 tasks. Once the limit is reached, existing tasks must be deleted before creating new ones.
- Auto-expiration: Recurring tasks automatically expire and are cleaned up 7 days after creation (one-time tasks are deleted immediately after triggering).
- Jitter Scheduling: To prevent multiple sessions from triggering simultaneously, the scheduler adds a deterministic jitter delay—recurring tasks are delayed by up to 10% of their interval (capped at 15 minutes); one-time tasks are triggered up to 90 seconds early when aligned to 30-minute boundaries. Jitter is calculated based on the task ID and remains stable across restarts.
- Missed tasks: If a task's next scheduled run time is already in the past (missed while the process was not running), a prompt will be shown at startup.
- Single-process driven: A File Lock ensures that only one process drives the scheduling for the same project directory, preventing duplicate triggers.
Creation and Deletion
- Create, list, and delete tasks using the Agent's scheduled task tool (simply request it in natural language during a conversation).
- Quickly create recurring tasks via
/loop; see Loop Command Reference. - Recurring tasks can be manually deleted before their 7-day auto-expiration.
Next Steps
- Scheduled task usage guide: Scheduled Execution Task.
- Loop execution: Loop Command Reference.