Skip to main content
Task Automation

Scheduled Execution Task

Overview

Scheduled tasks allow Qoder CLI to automatically run a prompt or slash command at a specified time. You can schedule a task to run once at a future point in time, or repeatedly on a calendar schedule. This is ideal for scheduled inspections, periodic reports, and planned automation scenarios. There are two types of scheduled tasks:
  • One-shot task: Triggered once at the next matching time, then automatically deleted.
  • Periodic Task: Triggered repeatedly according to a Cron schedule until deleted or automatically expired.

Creating Scheduled Tasks

In an interactive session, describe the time and the action in natural language, and Qoder will create the scheduled task for you. For example:
Check and summarize CI status every day at 9 AM
Generate a summary of last week's commits 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 the standard 5-field Cron Expression (minute, hour, day of month, month, day of week), interpreted based on the local time zone where the CLI is running. If you want to repeat at a fixed time interval (e.g., "every 5 minutes"), use the simpler /loop. See Scheduled Execution Task (/loop).

Cron Expression

Scheduled tasks use a 5-field Cron Expression:
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day (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 (equivalent to 0). L, W, ?, and Name Alias (such as MON) are not supported, nor is there a 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 in the current 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 where the CLI is running. For example, 0 9 * * * means 9:00 AM every day in the CLI's time zone.

Storage and Persistence

The persistence behavior of scheduled tasks falls into two categories:
  • persistent task: Written to <project>/.qoder/scheduled_tasks.json in the project root directory, and persists across process restarts.
  • in-session task: Stored only in memory, and disappears when the current session ends.
Tasks saved to disk are stored as a list of tasks in the file, with each task containing fields such as id, Cron Expression, prompt, and creation time.

Execution Limits

Scheduled tasks have the following limits:
  • Maximum number of tasks: Up to 50 tasks. Once the limit is reached, you must delete existing tasks before creating new ones.
  • Periodic Task auto-expiration: Periodic tasks automatically expire 7 days after creation, unless deleted earlier. Tasks that need to run long-term must be recreated.
  • Minimum granularity: Since there is no seconds field, the minimum scheduling granularity is 1 minute.
  • Single-process driven: A file lock ensures that only one process drives the scheduling for the same project directory, preventing duplicate triggers.
To prevent a large number of tasks from triggering simultaneously, the scheduler adds a small amount of jitter to the trigger times: Periodic tasks are delayed by a fraction of the next cycle length (up to 15 minutes); one-shot tasks are triggered up to about 90 seconds early when aligned to 30-minute boundaries (top and half of the hour).

Viewing and Deleting

During a session, you can ask Qoder to list current scheduled tasks or delete a specific task by its id. For example:
List all scheduled tasks
Delete scheduled task <id>
When creating a task, Qoder returns the task's id. Use this id to specify the task to cancel when deleting.

Missed Tasks

If the CLI is not running at the time a task was supposed to trigger (e.g., the process was not started), the task is identified as "missed". Upon startup, Qoder will notify you of missed tasks so you can decide whether to run them manually or adjust the schedule. For complete fields, limit values, and storage formats, see Scheduled Task Reference.
Scheduled Execution Task - Qoder