Field-level reference for scheduled tasks: cron expression syntax, storage location, runtime limits, and auto-expiry rules
Scheduled tasks let Qoder CLI CN automatically trigger a prompt or slash command at a specified time. This page covers the cron expression format, storage location, and runtime limits. For the usage guide, see Scheduled Tasks.
Scheduled tasks use standard 5-field cron expressions, interpreted in the local time zone of the machine running the CLI:
Supported field syntax:
Persistent scheduled tasks are stored in
Task fields:
Cron expression format
Scheduled tasks use standard 5-field cron expressions, interpreted in the local time zone of the machine running the CLI:
| Syntax | Meaning | Example |
|---|---|---|
* | Wildcard, matches all | * * * * * (every minute) |
N | Single value | 0 9 * * * (every day at 9:00) |
*/N | Step, every N units | */15 * * * * (every 15 minutes) |
N-M | Range | 0 9-17 * * * (on the hour from 9 to 17) |
N,M,... | List | 0 9,12,18 * * * (at 9/12/18 daily) |
Common examples:L,W,?, and name aliases are not supported. When both day-of-month and day-of-week are constrained, OR semantics apply — either match triggers (standard cron behavior).
| Expression | Meaning |
|---|---|
*/10 * * * * | Every 10 minutes |
0 * * * * | Every hour on the hour |
0 9 * * * | Every day at 9:00 |
0 9 * * 1-5 | Weekdays at 9:00 |
0 0 */2 * * | Every 2 days at 0:00 |
Storage location
Persistent scheduled tasks are stored in .qoder/scheduled_tasks.json under the project. File format:
| Field | Description |
|---|---|
id | An 8-digit hexadecimal task identifier. |
cron | A 5-field cron expression. |
prompt | The prompt text or slash command enqueued when triggered. |
createdAt | Creation timestamp (milliseconds). |
lastFiredAt | Last trigger timestamp (milliseconds; written back for recurring tasks). |
recurring | Whether the task is recurring. |
Task types
- One-shot tasks (
recurringfalse or absent): deleted automatically after firing once. - Recurring tasks (
recurring: true): fire repeatedly on the cycle, rescheduled from the current time, until explicitly deleted or automatically expired.
Runtime limits and expiry
- Maximum task count: at most 50 tasks; once the limit is reached, existing tasks must be deleted before new ones can be created.
- Auto-expiry: recurring tasks expire and are cleaned up automatically 7 days after creation (one-shot tasks are deleted after firing).
- Jittered scheduling: to avoid multiple sessions firing at the same instant, the scheduler adds deterministic jitter — recurring tasks are delayed by up to 10% of their interval (capped at 15 minutes); one-shot tasks aligned to 30-minute boundaries may fire up to 90 seconds early. Jitter is derived from the task ID and 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 notice is shown at startup.
- Single-process driving: within the same project directory, a file lock ensures only one process drives the scheduler, avoiding duplicate triggers.
Creating and deleting
- Create, list, and delete tasks through the Agent's scheduled-task tools (just ask in natural language in the conversation).
- Recurring tasks can be created quickly with
/loop— see Loop Command Reference. - Recurring tasks can be deleted manually before their 7-day auto-expiry.
Next steps
- Scheduled tasks usage guide: Scheduled Tasks.
- Looped execution: Loop Command Reference.