Scheduled Task Reference - Qoder
Skip to main content
Reference

Scheduled Task Reference

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.

cron expression format

Scheduled tasks use standard 5-field cron expressions, interpreted in the Local Time Zone where the CLI is running:
┌───────── Minute (0-59)
│ ┌─────── Hour (0-23)
│ │ ┌───── Day (1-31)
│ │ │ ┌─── Month (1-12)
│ │ │ │ ┌─ Day of week (0-6, 0=Sunday; 7 is also Sunday)
│ │ │ │ │
* * * * *
Supported field syntax:
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).
Common examples:
ExpressionMeaning
*/10 * * * *Every 10 minutes
0 * * * *Every hour on the hour
0 9 * * *9:00 every day
0 9 * * 1-59: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:
{
  "tasks": [
    {
      "id": "a1b2c3d4",
      "cron": "0 9 * * *",
      "prompt": "/standup",
      "createdAt": 1700000000000,
      "recurring": true
    }
  ]
}
Task fields:

Task Types

  • One-time task (recurring is 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