Scheduled Tasks
Scheduled tasks save a complete instruction and run it later in an isolated Device Agent session. Create a task in conversation, then use Schedules to inspect it, pause or resume future runs, update its instruction, and review each execution.
Create a Task
In a Device Agent workspace, select the target device when the task needs one, then describe the work and schedule. Device Agent supports one-shot, fixed-interval, and cron schedules and returns the next run time after creation.
| Task type | Example |
|---|---|
| Delayed run | In 1 minute, set the current thermostat target temperature to 24°C. |
| Fixed interval | Every 5 minutes, check the current temperature. If it is above 30°C, set the target temperature to 24°C. |
| Daily run | Every morning at 9 AM, switch the current thermostat to eco mode. |
Make the instruction self-contained because each run uses a separate session and cannot rely on context omitted from the saved instruction. The task also stores its schedule, timezone, Device Agent, and device scope.
Fixed intervals have a minimum of 60 seconds. A wall-clock time without an explicit timezone uses the Gateway system timezone captured when the task is created.

Manage Tasks
Open Schedules. Active includes scheduled, paused, and currently running tasks; Completed contains finished one-shot tasks. Select a task to view its instruction, schedule, timezone, device scope, status, last and next run times, source session, and latest error. Use the task ID at the top to correlate logs.

| Action | Result |
|---|---|
| Enable or pause | Pausing prevents new runs but lets an active run finish. When an overdue task is resumed, a one-shot task becomes due and a recurring task recalculates its next occurrence. |
| Edit instruction | Changes only the instruction for future runs. The schedule, timezone, and device scope remain unchanged, and an active run keeps its original instruction. |
| Open chat | Returns to the source conversation when it is still available. |
| Cancel | Prevents future runs but lets an active run finish. |
Completed tasks are read-only. To change the schedule, timezone, or device scope, cancel the task and create a new one. Tasks can also be managed in conversation; use the task ID when similar tasks exist.
Check Run History
Select a task and click Run history to view each run's start and completion time, status, duration, result or error, run ID, and isolated session ID. Expand a record to read its full result.

For deeper diagnostics, click View logs to open Logs with the task ID applied. A successful run means the Device Agent completed the saved instruction; for device actions, also verify current device state, device-side logs, or MQTT messages.
Runtime and Restart Behavior
- Tasks, status, and Run history are persisted. A Gateway restart restores enabled schedules, while paused tasks remain paused.
- Tasks do not run while the Gateway is stopped. After startup, an overdue enabled task runs at most once; recurring tasks do not replay every missed interval.
- If the Gateway stops during a run, that execution is recorded as failed. One-shot tasks are not retried automatically, while recurring tasks continue with later runs.
- Every run uses the saved Device Agent and device scope. Target devices and dependent services must be available at run time.