Scheduled tasks#
A Lens Prism agent can put work on its own calendar. A scheduled task is an instruction plus a time — run once at a moment, or repeatedly on a cadence. Tasks survive restarts, and the agent can create, list, run, and cancel them itself. Where the heartbeat is a single recurring monitoring loop, scheduled tasks are arbitrary one-off or recurring jobs: "summarize the overnight alerts every weekday at 9am," "remind me in 30 minutes," "every hour, check the deploy queue."
Specifying the schedule#
Describe the timing in natural language or with a raw cron expression. The agent and the terminal UI accept both; the web UI create form takes cron expressions.
Natural language is handled when you ask the agent to schedule something:
| You say | Becomes |
|---|---|
| "in 30 seconds" | one-shot, 30 seconds from now |
| "in 5 minutes" | one-shot, 5 minutes from now |
| "at 3pm" / "at 14:30" | one-shot at that time (today if still ahead, else tomorrow) |
| "every 2 hours" | recurring, every 2 hours |
| "every 30 minutes" | recurring, every 30 minutes |
| "every day at 9am" | recurring daily at 09:00 |
Cron expressions give precise control:
0 9 * * * # every day at 09:00
*/15 * * * * # every 15 minutes
0 9 * * 1-5 # 09:00 on weekdays
Schedules run in the agent's configured timezone (see Agent identity).
Creating and managing tasks#
| Surface | How |
|---|---|
| Conversation | "Schedule a daily 9am summary of failing pods." The agent creates the task. |
| Web UI | Scheduled Tasks page — create (name, cron, instruction), list, delete. |
| Terminal UI | /schedules panel — list, n to create, d to delete. |
Each task has a name, a schedule, and an instruction — the prompt the agent runs on each tick. When a task fires, the agent executes that instruction with its full toolset and delivers the result to your active conversation, and to connected channels, labeled as a scheduled-task result.
Scheduled runs use the agent's main model by default. Give them their own model from the web UI Profile page or the terminal UI (/cron-model <ID>).
Reliability#
- Tasks are stored in the embedded database.