Scheduled Tasks
Create recurring tasks using natural language descriptions. Myrm’s cron system supports three scheduling modes, task chaining, situation reports, and 10-layer anti-noise defense — far beyond basic cron scheduling.Creating a Task
Via Chat (Natural Language)
Describe your schedule naturally in any conversation:“Every morning at 9 AM, scrape competitor prices and email me a comparison report”The agent automatically detects scheduling intent and presents an approval card — once you confirm, the task is created instantly. A structured task card appears in the chat showing the task name, schedule, next run time, and bound model, with a button to jump to the management dashboard. The agent also auto-matches the best built-in blueprint template to improve task quality. Recurring schedules require explicit confirmation to prevent accidental creation.
Cron Tool Mode (Agent Config)
By default, cron management is discoverable — it does not occupy your Turn1 tool schema (~0 cron tokens). When you describe a schedule in chat, Myrm loadscron_manage_tool on demand.
Enable or disable in Agent config → Built-in tools → Scheduled tasks (Cron). On cloud/sandbox plans without cron entitlement, the toggle is disabled with an upgrade link — the same rule applies to GUI, REST API, and Agent paths.
Both discover (default) and eager modes are covered by automated tests and real-model WebUI end-to-end verification.
Via GUI
Navigate to Settings > Scheduled Tasks and click Create to use the visual configuration dialog with schedule picker, model selector, and delivery options. Choose from 14 blueprint templates (morning briefing, weekly review, wiki morning delta, read-it-later ingestion, etc.) for one-click setup — the same templates the Agent uses via API. TheGET /cron/blueprints API returns localized title, description, and prompt_template for en, zh, ja, de, and ko; the catalog loads exclusively from this API (retry on failure). Slot labels use frontend locale keys.
Task Types
Script Mode (Zero LLM Cost)
Select Script (Python) when creating a task to run Python code without any LLM invocation. The script executes in an isolated subprocess with a 60-second timeout.- stdout becomes the output — non-empty output is delivered to configured channels, empty output is silently skipped
- Skip signals: Print
[SKIP]or{"action": "skip"}to abort the task gracefully - Cloud-safe: Unlike shell commands, Python scripts are available in all deployment modes (local, desktop, cloud sandbox)
- Use cases: API health checks, data monitoring, RSS filtering, database audits
Three Scheduling Modes
Session Modes
Control how the agent handles conversation context across repeated executions:Daily Mode in Action
When a task runs in Daily mode:- The agent sees previous same-day outputs chronologically (up to 5 runs, truncated to 500 chars each)
- The first run of a new day includes yesterday’s final output as a brief summary
- This enables the agent to detect trends — e.g., “CPU went from 45% → 72% → 90% over the last 3 hours”
Task Chaining (context_from)
Chain tasks together so one task’s output feeds into another:“Task A collects daily sales data, Task B analyzes it and generates a report”Set
context_from to inject referenced jobs’ latest successful output into the next task’s prompt.
Heartbeat Monitoring
Built-in periodic self-check (__heartbeat__) with Situation Report injection — the agent reviews memory changes, pending reminders, due commitments (follow-up tracking), and system health before each tick, transforming blind checks into intelligence-driven actions. Due commitments are automatically marked as delivered to prevent duplicate notifications.
Agent Binding
Bind any Agent Profile to the heartbeat in Settings → System → Heartbeat. The heartbeat inherits the bound Agent’s model, system prompt, skills, and tool configuration — no need to configure these separately.- One dropdown: Select from built-in or custom Agents.
- Model inheritance: The UI shows which model will be used (e.g. “Using model: openai/gpt-4o-mini”).
- Unbind: Switch back to “Default Agent” to clear the binding — heartbeat reverts to the global default model.
- Agent Profile SSOT: Update the Agent’s model once and all bound heartbeats automatically use the new model at next execution.
Scheduler Liveness Dashboard
A real-time visual indicator at the top of the Cron Dashboard shows scheduler health at a glance:
The badge polls
GET /api/v1/cron/scheduler/health every 30 seconds. It pauses automatically when the browser tab is hidden and refreshes immediately when you switch back — saving server resources in multi-tab workflows.
Hover over the badge to see the exact last tick timestamp and error count.
Smart Delivery
Script Delivery (Inline Channel Selection)
When creating a Script (Python) task, the dialog shows an inline delivery target selector:- Chat (default) — output stays in the task history
- Connected IM channels — auto-discovered from your configured integrations (only connected channels appear)
- Target field — specify chat ID, channel name, or webhook URL depending on the selected channel
Delivery Assurance (Opt-In Post-Run Review)
For Agent scheduled tasks (not script-only jobs), you can enable an optional delivery review per Agent:- Open Settings → Agents → [your agent] → Capabilities
- Under Delivery Assurance, turn on Scheduled Task Verification
- Save — the setting persists per Agent (default is off)
Why this exists: Unattended jobs can report “done” while side effects are wrong. This gives you a structured audit trail in the Cron run list — competitors typically only offer silent turn-end guards or goal rubrics, not opt-in Cron run metadata + WebUI badges.
Cost control: Default off; read-only runs skip review; interactive chat is unaffected (no extra Turn1 tools).
Acceptance Criteria (Structured Output Verification)
Define measurable quality checks that automatically verify your task’s output after every run. Unlike Delivery Assurance (LLM-based review), acceptance criteria are deterministic — shell commands or semantic checks that gate success/failure.Adding Criteria
When creating or editing a task in the GUI, expand the Acceptance Criteria section (agent-type tasks only):- Click Add criterion
- Choose type:
- Shell — a shell command that must succeed (exit code 0) or match expected output
- Semantic — an LLM judge evaluates if the output meets a natural-language description
- Describe the check (e.g., “Output JSON has at least 3 items” or “Report mentions all 5 competitors”)
How It Works
Both paths use the same
VerificationGatekeeper from the harness framework — criteria are evaluated identically regardless of execution mode.
Failure Behavior
- If any criterion fails → run status is marked FAIL
- Failure delivery (configured alert channels) is triggered
- The task is not auto-retried (same as normal failures)
Example
A daily price scraper with acceptance criteria:
If the scraper only fetches 2 of 3 competitors due to a site change, the shell check fails immediately — you get an alert instead of discovering missing data days later.
API Support
ThePOST /cron/jobs and PATCH /cron/jobs/:id endpoints accept an acceptance_criteria array:
10-Layer Anti-Noise Defense
Incremental Monitoring
Enable intelligent delta detection so tasks only report genuinely new content:
When enabled, the system computes a delta between current output and the stored baseline. If no new content is detected, delivery is silently skipped (exit_code=0). Only genuinely new information triggers notifications (exit_code=1), with just the delta delivered to channels.
Baseline auto-resets after TTL expiration, ensuring long-running monitors don’t accumulate stale state.
Agent dialogue control: Monitoring can be fully configured through conversation — tell the Agent “only notify me when the price changes” to enable set-based monitoring, or “notify me every time” to disable it. The Agent supports
monitor_type values set, hash, timeseries, and off (to disable).
Integrity Verification (Merkle Chain)
Every execution is hash-chained to its predecessor using SHA-256, creating a tamper-evident audit trail:- Verify chain integrity via
POST /api/v1/cron/{job_id}/verify-integrity - Detects gaps (missing runs), tampering (modified outputs), or reordering
- Enterprise compliance: cryptographic proof that scheduled tasks ran as expected
Event-Driven Triggers
Beyond time-based scheduling, tasks can be triggered by external events:
Trigger context (the matched message, event payload, webhook body, stream data, or polled content) is injected into the Agent’s prompt so it knows why it was triggered.
IM Message → Event Trigger (Architecture)
Inbound messages from connected channels (Feishu, Telegram, Slack, etc.) can fire event-triggered cron jobs automatically:- Connect a channel in Settings — long-connection or webhook ingress
- Create a task with trigger type Event — set channel filter and regex pattern
- Messages flow through
AgentRouter— commands (/stop,/new), reactions, and pending approvals are skipped; matching messages dispatch once
Remote Node Events (Mobile / IoT Automation)
External systems can report structured events to your Agent via HTTP — no always-on connection, no SDK required:
Authentication: Requires a valid
pair_token (hub_list scope) issued via QR code pairing, or an active WebUI session.
How to set up:
- Pair your mobile device via Settings → Remote Access → QR Code
- Create a scheduled task with trigger type System Event — set source and event_type filters
- Configure iOS Shortcuts / Android Tasker / Home Assistant to POST events to the endpoint
Crash Recovery
Myrm’s scheduler auto-recovers after unexpected restarts with a 3-phase startup recovery:- Stale-Run Recovery — detects tasks marked “running” that never completed (process crash) and reschedules
- Missed-Slot Replay — identifies cron slots that were missed during downtime and replays them
- Grace Window — tasks within the misfire grace window execute immediately; expired ones skip to next cycle
Security
- Fail-closed by default: tasks without declared
required_capabilitiesare denied shell/code/MCP execution with clear guidance - Per-job capability fence: each task independently declares required permissions (
shell_exec,file_write,mcp_invoke, etc.) — declared capabilities are pre-approved, undeclared ones are denied - BLOCK-level absolute denial: destructive commands (
rm -rf /,sudo,DROP DATABASE, etc.) are always rejected even within approved capabilities - Prompt injection scanning (12 patterns) before every execution
- ContextVar self-scheduling guard prevents infinite task chains (cron job cannot create new cron jobs)
- Budget enforcement blocks execution when daily budget is exceeded
- ReDoS protection on event trigger regex patterns
- SSRF protection on webhook delivery URLs
Desktop Power Management
On Tauri desktop, scheduled tasks automatically acquire a PowerLock to prevent system sleep during execution:- macOS:
caffeinatesubprocess - Linux:
systemd-inhibit - Windows:
SetThreadExecutionState
Blueprint Templates (One-Click Setup)
Create common automation tasks in 3 clicks with pre-built templates. Navigate to Scheduled Tasks > Create > From Template to browse available blueprints.
Second Brain quick start (Settings → Wiki): One click applies the preset agent plus both Read-it-Later (06:00) and Wiki Morning Delta (07:00) cron jobs — no manual blueprint wiring. Re-apply is idempotent if you applied an earlier preset version that only had one cron.
Automated brand monitoring using browser automation — works on platforms without public APIs (Xiaohongshu, Weibo, Twitter/X, LinkedIn, Douyin).
Setup: Select the Social Media Watch template → fill in your brand name and target platforms → keywords are optional (brand-only monitoring works) → choose delivery channel → done.
What it does each run:
- Navigates target platforms via browser automation
- Searches for brand mentions using configured keywords
- Classifies sentiment (positive/neutral/negative)
- Produces a structured intelligence report
- Flags strongly negative posts for immediate attention
- Delivers via configured IM channel (or stays silent if nothing notable)
Examples
Related Features
- Growth Dashboard — AI Daily Wrap auto-generates a summary of your day’s activity, keywords, and suggestions. The Growth Dashboard visualizes activity heatmaps, memory health radar, skill evolution events, and cost savings.
- Statistics API — Programmatic access to daily wrap data, growth metrics, and usage analytics.