Skip to main content
Task automation

Scheduled Tasks

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:
Check the CI status and summarize it every day at 9 AM
Generate last week's commit summary every Monday at 10 AM
Remind me to publish the release on February 28 at 2:30 PM
Qoder parses your description into a Cron expression and creates the task. Tasks use standard 5-field Cron expressions (minute, hour, day of month, month, day of week), interpreted in the local time zone of the machine running the CLI. If you want to repeat at a fixed interval (such as "every 5 minutes"), use the simpler /loop — see Repeating Tasks.

Cron expressions

Scheduled tasks use 5-field Cron expressions:
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─ day of week (0-6, 0 = Sunday)
│ │ │ │ │
* * * * *
Supported field syntax: wildcard *, 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:
CronMeaning
*/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 * * 1Every Monday at 10:00 AM
0 9 * * 1-5Weekdays 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.json in the project root, surviving process restarts.
  • In-session tasks: kept in memory only, gone when the current session ends.
Tasks saved to disk are stored as a task list in the file, where each task includes fields such as id, cron expression, prompt, and creation time.

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.
To avoid many tasks firing at the same instant, the scheduler adds a small amount of jitter to trigger times: recurring tasks are delayed by a small fraction of the next cycle length (up to 15 minutes); one-shot tasks aligned to 30-minute boundaries (on the hour and half hour) may fire up to about 90 seconds early.

Viewing and deleting

Within a session, you can ask Qoder to list current scheduled tasks or delete a task by id. For example:
List all scheduled tasks
Delete scheduled task <id>
When creating a task, Qoder returns the task's id; use that id to specify which task to cancel when deleting.

Missed tasks

If the CLI was not running at a time when a task should have fired (for example, the process was not started), the task is recognized as "missed." At startup, Qoder surfaces missed tasks so you can decide whether to run them retroactively or adjust the schedule. For the complete fields, limit values, and storage format, see Scheduled Tasks Reference.