Scheduled tasks¶
Scheduled tasks let you automate recurring work with Cortex Code. Each task is a saved prompt that runs on a schedule. When a scheduled task fires, Cortex Code starts a new chat session, sends your prompt to the agent, and notifies you when it finishes.
Scheduled tasks are available in all Cortex Code Desktop builds. Tasks are stored locally per machine and per OS user — they are not synced across devices.
Important
Scheduled tasks only run while Cortex Code is open and your computer is awake. If the app is closed or the machine is asleep when a task is due, the run is skipped. When you reopen the app, the most recent missed run for each task is caught up automatically and shown as a “catch-up” run in history. Older missed runs are discarded.
What scheduled tasks are good for¶
- Morning briefing: Pull yesterday’s failing tests, new issues, and unmerged PRs into a single status digest at 9 am.
- Daily code review: Scan new commits or open pull requests on
mainsince yesterday and post a short summary of what changed and anything risky. - Dependency and security audit: Check
package.json,pyproject.toml, or other manifests weekly for outdated or vulnerable dependencies and produce an upgrade plan. - Snowflake data checks: Run a recurring query against a Snowflake table to flag row-count drops, freshness regressions, or anomalous values, and write the findings to a markdown file.
Quick start¶
- Open the Scheduled tasks view from the activity bar.
- Click New task.
- Give the task a title and write a prompt describing what you want the agent to do.
- Pick how often it should run (for example, Daily at 9:00).
- Click Create. The task starts firing on the schedule you chose.
- Click Run now to fire the task once and approve any tool permission prompts so future runs don’t stall.
The next run time is shown on the task’s card. You can pause, edit, delete, or Run now at any time.
Creating a task¶
When you click New task, you’ll see a form with these fields:
Task title¶
A short name to identify the task. Shown in the task list and used in run notifications (for example, “Daily standup summary”).
Task definition (the prompt)¶
The instructions sent to the agent each time the task fires. Write this exactly as you would in a normal chat. You can:
- Reference files using
@mentions - Use
/to insert a skill - Attach files
The same prompt is sent on every run. Anchor it on stable references (skills, files in your repo, search queries) rather than on transient context.
Tip
Keep prompts self-contained. Scheduled runs don’t carry over context from previous runs — write the prompt as if the agent is seeing the request for the first time. If you find yourself copying the same multi-step instructions into multiple tasks, factor them out into a skill and reference it with /.
Schedule¶
Choose how often the task runs:
| Option | Behavior |
|---|---|
| Manual | Never fires automatically. Use Run now to trigger it. |
| Hourly | Fires every hour at the top of the hour. |
| Daily | Fires once per day at the time you pick. |
| Weekdays | Fires Monday through Friday at the time you pick. |
| Weekly | Fires once per week on the day and time you pick. |
| Custom | Repeat every N days or weeks, optionally only on selected weekdays. |
All times are in your local timezone. Cortex Code adds a small randomized delay (under 2 minutes) to scheduled fire times so heavy tasks don’t all queue at once; the displayed next-run time is the actual fire time.
Tip
If you have many daily tasks, spread them across different times so they don’t all run at 9:00.
Ends (optional)¶
Limit how long the task keeps running:
- Never — runs indefinitely (default).
- On (date) — stops scheduling new runs after this date.
- After N occurrences — stops after the task has run successfully N times.
Project¶
The folder the task runs in. Pick an existing project, or choose Playground for tasks that don’t need a workspace. If the project folder is later removed or moved, the task auto-disables to avoid running in the wrong place; re-point it at the correct folder and re-enable.
Model¶
Pick which LLM the task uses. Leave on Auto to use your default model.
Attachments (optional)¶
Files included as context on every run. Useful for templates, style guides, or example outputs.
Managing tasks¶
The Scheduled tasks page lists all your tasks, split into Active (enabled) and Inactive (paused).
Each row shows:
- Task title and prompt preview
- Schedule summary (“Daily at 09:00”)
- Next run time
- Last run status
Hover a row to reveal these actions:
- Run now — fire the task immediately, regardless of schedule.
- Pause / Resume — toggle whether the task fires on schedule. Paused tasks remain editable and can still be run manually. Pause tasks before vacations so they don’t accumulate catch-up runs.
- Edit — change any field. Schedule changes take effect on the next computed run.
- Delete — permanently remove the task and its run history.
Click a task to open its detail view, which adds:
- Status — current state, last run result, next scheduled fire.
- Previous runs — recent run history. Click any entry to open that run’s chat session and review what the agent did.
Run history¶
Cortex Code keeps the most recent 50 runs per task. Each entry records:
- When the run started and finished
- The status (
completed,failed,running, or stalled) - A link to the chat session it spawned
- Whether it was a catch-up run (started after the app reopened)
Older runs roll off, but the lifetime completed run count keeps incrementing — useful if you set an “After N occurrences” limit.
Notifications¶
When a run completes, Cortex Code shows a desktop notification. Click it to jump to the chat session for that run. Notifications rely on OS-level desktop notification permission for Cortex Code — if you’re not seeing them, check your OS notification settings.
Permissions¶
If a task tries to use a tool that requires approval, the run pauses and waits for you to approve or deny it from the chat session. To avoid stalls on future runs, click Run now after creating a task, watch the session for any tool prompts, and approve them.
To skip approval prompts entirely for a task, use a bypass permission mode.