Overview
Scheduled tasks let Qoder CLI CN automatically run a prompt or slash command at a specified time. You can schedule a task to run once at some future time, or repeat periodically on a calendar schedule. It suits periodic inspections, recurring reports, and automation triggered on a schedule.
There are two kinds of scheduled tasks:
- One-shot: fires once at the next matching time, then deletes itself automatically.
- Recurring: fires repeatedly on a Cron schedule until deleted or automatically expired.
Creating a scheduled task
In an interactive session, describe the time and the work in natural language, and Qoder creates the scheduled task for you. For example:
/loop — see Repeating Tasks.
Cron expressions
Scheduled tasks use 5-field Cron expressions:
*, single value N, step */N, range N-M, list N,M,.... In the day-of-week field, 7 is treated as Sunday (same as 0).
L, W, ?, and name aliases (such as MON) are not supported, and there is no seconds field.
Examples:
| Cron | Meaning |
|---|---|
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour on the hour |
0 9 * * * | Every day at 9:00 AM |
30 14 28 2 * | February 28 at 2:30 PM (once that year) |
0 10 * * 1 | Every Monday at 10:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
All times are interpreted in the local time zone of the machine running the CLI. For example, 0 9 * * * means 9 AM every day in the CLI's time zone.
Storage and persistence
Scheduled tasks come in two persistence flavors:
- Persistent tasks: written to
<project>/.qoder/scheduled_tasks.jsonin the project root, surviving process restarts. - In-session tasks: kept in memory only, gone when the current session ends.
Runtime limits
Scheduled tasks are subject to the following limits:
- Maximum task count: at most 50 tasks. Once the limit is reached, you must delete existing tasks before creating new ones.
- Recurring tasks auto-expire: recurring tasks expire automatically 7 days after creation unless deleted earlier. Long-running tasks need to be recreated.
- Minimum granularity: with no seconds field, the minimum scheduling granularity is 1 minute.
- Single-process driving: within the same project directory, a file lock ensures only one process drives the scheduler, avoiding duplicate triggers.