Skip to content

Scheduled tasks ​

Open Schedules on an agent's page to create, edit, pause, resume, run, or delete saved prompts. The panel shows each schedule's next local run time, enabled state, delivery channel, and recent run outcomes. /schedules lists schedules in the owner's Telegram chat or Discord DM even if the Host is stopped. Edit Delivery channel to route future runs to a different linked owner chat, or choose Web to save results in the panel chat without a linked bot. Existing schedules keep their destination. New panel schedules default to a linked channel, or Web when no owner chat is linked.

Agents can list, read, create, edit, pause, resume, and delete their own schedules without owner confirmation, from Web, Telegram, Discord, or scheduled and webhook runs. For example, ask “Review Company X's earnings once at 10:30” or “Run this check in 20 minutes.” The agent uses the current schedule context to resolve the local date and time, then saves the schedule immediately. New schedules default to the task's delivery channel; edits preserve the existing channel unless changed.

The tools are schedule_context, schedule_list, schedule_get, schedule_create, schedule_update, schedule_set_enabled, and schedule_delete. Create and update take full name, prompt, time zone and cadence settings; update also takes the schedule ID. Delivery channel is optional. List returns summaries; get returns full settings and recent runs. Webhook secrets remain panel-only. Agents should use persistent once schedules instead of keeping a process asleep for future work. Schedule administration does not require approval; this is part of the installation's shared trust domain, not an isolation boundary.

Set the installation's Schedule time zone in the panel under Settings. It starts at UTC, applies to new schedules created in chat, and prefills the editable time zone for new schedules in the panel. Saved schedules retain their own time zone.

Cadences and limits ​

CadenceTiming
OnceOne local date and time; disabled after its task is durably enqueued; the agent deletes it after verifying success
DailyThe same local time each day
WeeklyThe same local time on one or more selected weekdays
IntervalEvery N minutes, anchored to creation time across pauses, edits, and restarts
CronA five-field cron expression evaluated in the schedule time zone
WebhookOn an authenticated POST request; no timed occurrence

Limits are 20 schedules per agent, an interval of at least 15 minutes, a name of up to 60 characters, and a prompt of up to 4000 characters. A local time skipped by daylight saving runs at the next valid instant; a repeated time runs only at its first occurrence. Intervals use elapsed minutes. These are fixed rules, with no scheduler-specific environment variables.

Cron expressions accept up to 100 characters. The fields are minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–7, with Sunday as 0 or 7). Use *, values, ranges, comma-separated lists, or steps on wildcards and ranges. Month names JAN–DEC and weekday names SUN–SAT are case-insensitive. The supported shortcuts are @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly. When both day fields are restricted, either one can match. The minute values must be at least 15 minutes apart, including the gap across the hour boundary. Cron follows the daylight-saving rules above, and runs that fall into the same skipped interval collapse to one run at the next valid instant. The panel previews up to five runs and chat confirmations show the first and up to three more.

Panel API ​

The same operations are available under the authenticated /api/agents/:id/schedules API. Mutations use POST. Schedule settings are form fields name, prompt, timeZone, and cadence (a JSON object with its kind and matching fields). The optional deliveryChannel field accepts telegram, discord, or web. Omitting it on edit preserves the saved channel. The server assigns interval anchors. For a weekday schedule at 9 a.m., send cadence={"kind":"cron","expression":"0 9 * * 1-5"}. Read or change the global zone with GET or POST /api/settings/schedules. The POST accepts the timeZone form field.

Execution and delivery ​

The scheduler runs inside the Nimbot Server, once at startup and every 30 seconds. It records each occurrence, enqueues its task, and advances the next run in one SQLite transaction. A repeated tick or server restart cannot enqueue the same timed occurrence twice. For recurring schedules, a saved due occurrence up to 10 minutes late is considered once; older occurrences are recorded as missed. The next run advances past the current server time, without replaying a backlog. A previous task from the same schedule still queued or running produces skipped_overlap. A stopped or unavailable Host, incomplete setup, or unlinked owner chat for Telegram/Discord produces skipped_not_ready. Schedules never start stopped Hosts automatically. The server attempts a durable notification only for the first not-ready skip of a consecutive streak.

Once schedules remain pending, without a lateness limit, until their task can be enqueued. If the Host or delivery channel is unavailable, or another run of that schedule is unfinished, each later tick checks again without recording repeated skips. Stopped Hosts still require a manual start. Enqueueing and disabling the schedule happen in one transaction. The task receives the schedule ID and an instruction to delete the schedule only after checking the requested action succeeded. Failure or cancellation leaves it disabled for inspection; there is no automatic task retry or guaranteed cleanup. This prevents duplicate enqueueing of an occurrence; it does not guarantee exactly-once external side effects.

Scheduled, manual and webhook runs can use the MCP integrations currently enabled for their agent, including HTTPS and local stdio integrations. Eligible tools are snapshotted when execution starts, and current access, schemas and rules are checked again before calls and saved-result replay. Creating a schedule does not preapprove MCP actions. Calls follow the same rules as chat: no matching rule runs automatically; Deny blocks execution; Ask gives the owner 30 seconds to respond in the saved delivery channel. Web approvals appear in the panel and still expire if the browser is closed. A missing or unavailable integration returns an error. There is no automatic retry of external side effects. Memory, attachments and peer/delegation tools remain unavailable to scheduled and webhook runs.

Web schedules run without an open browser or a connected bot. Their results and approvals are available in the agent’s panel chat and execution history. The chat identifies scheduled and webhook runs by schedule name. Web skip outcomes remain available in the panel; they do not send bot notifications.

Each executed run uses the agent's AI provider credits and shares its existing conversation context and FIFO queue with chat messages. Only the final result or failure is sent, prefixed with the schedule name saved at enqueue time. Scheduled runs do not show a typing indicator. For Telegram and Discord, results, approvals, and /stop use the linked owner chat saved when the run was queued. Web results and approvals use the panel. A new destination applies to future runs.

Manual runs and schedule changes ​

Run now uses the same readiness and overlap checks and records its outcome without changing the next timed occurrence. A paused schedule can still be run manually. Resume recomputes the first future occurrence; an expired once schedule needs a future date before it can resume. Deleting a schedule removes its run history and stops future runs; already queued or running tasks are kept. Deleting an agent removes its schedules and run history while preserving agent data unless data deletion was explicitly requested.

Webhook activation ​

Choose Webhook in the schedule's Activation field and save. Open Show webhook details to get its URL and private Bearer token. The URL uses the configured PANEL_URL; external callers need to reach that origin. Use HTTPS when exposing it outside localhost. Tokens are stored in the server database, excluded from schedule listings, and visible only through the authenticated panel API. Regenerate token immediately revokes the previous token. Changing to a timed activation or deleting the schedule also revokes webhook access.

sh
curl -X POST 'https://nimbot.example.com/hooks/schedules/SCHEDULE_ID' \
  -H "Authorization: Bearer $WEBHOOK_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"event":"deployment","environment":"production"}'

An empty body runs the saved prompt. An optional JSON body of up to 16 KiB is appended as external data to the task prompt and persisted with the task. It cannot override the saved prompt or delivery target. Cookies and panel login are not used for this endpoint. Requests return 202 once the task is durably queued, 401 for invalid credentials, 400 for invalid JSON, 413 for an oversized body, or 415 for an unsupported content type. A paused, changed, or not-ready schedule returns 409; an unavailable scheduler returns 503. Responses contain only an outcome and, on failure, an error message. Results and approvals use the schedule’s selected delivery channel, including the panel chat for Web.

A request that arrives while an earlier run of the same schedule is still queued or running is not skipped: it becomes its own task, with its own payload, in the agent's durable FIFO queue, and runs in arrival order. One webhook schedule can hold up to 20 unfinished tasks; further requests return 429 until the backlog drains. Timed occurrences and Run now keep the overlap skip. A stopped or not-ready agent queues nothing and returns 409.

Webhook admission is limited to five attempts per rolling minute. Recent skipped and manual runs count toward this limit; additional requests return 429 with Retry-After: 60 before the Host is contacted. The limit survives server restarts. Pausing blocks webhooks; Run now still works while paused. Admission rechecks the enabled state, settings, token, and backlog before persisting work. Webhook invocations do not have automatic retries or event deduplication: a repeated request creates another task. External callers should avoid blindly retrying uncertain deliveries. Webhooks never start stopped Hosts automatically.

The authenticated API exposes GET /api/agents/:id/schedules/:scheduleId/webhook and POST /api/agents/:id/schedules/:scheduleId/webhook/rotate to read or regenerate {url, token}. Create or edit with cadence={"kind":"webhook"} and timeZone=UTC, alongside the usual name and prompt form fields.

For skipped runs and delivery issues, see schedule troubleshooting.