Skip to content

Scheduled Tasks

Scheduled Tasks define execution schedules using cron expressions. They act as the time trigger for Device Actions.

A Scheduled Task does not directly operate on devices. It only takes effect when bound to one or more Device Action events, which carry the actual command and target device list.

Configuration Fields

FieldDescription
NameCustom label for identification
TypeFixed as "Devices Control"
EnableDisabling pauses the task; bound Device Actions will no longer be triggered
Cron ExpressionDefines the schedule; supports second-level precision (6-field format)
RemarkOptional description

Scheduled Task Configuration

Cron Expression Format

ThinkLink uses a 6-field cron expression in the following order:

Second  Minute  Hour  Day  Month  Weekday
FieldRangeWildcards
Second0–59, - * /
Minute0–59, - * /
Hour0–23, - * /
Day1–31, - * ? /
Month1–12, - * /
Weekday0–6 (0=Sunday), - * ? /

Common Examples

ScheduleCron Expression
Every minute0 * * * * ?
Every hour on the hour0 0 * * * ?
Daily at 2:00 AM0 0 2 * * ?
Daily at 8:30 AM0 30 8 * * ?
Every Monday at 8:00 AM0 0 8 ? * 1
1st of every month at midnight0 0 0 1 * ?
Every 5 minutes0 */5 * * * ?
Every 30 seconds*/30 * * * * ?

Note: Day and Weekday fields cannot both be specified — one of them must be ?.

Configuration Workflow

  1. Go to Scheduled Tasks and click Add
  2. Enter a name and write the cron expression (real-time validation is shown in the UI)
  3. Enable the task and save
  4. Go to Device Action and bind the new task to the relevant action event

Viewing and Operating Bound Device Executions

Click "Device Executions" in the operation column of the Scheduled Task list to open a card view of the device executions bound to this scheduled task. Each card can be operated directly, without navigating to the Device Action page:

ActionDescription
DetailOpen the device execution's detail drawer to view/edit
Execute NowTrigger this device execution once immediately, without waiting for the cron cycle. While running, this button becomes Interrupt to stop the current batch dispatch
Enable / DisableToggle the device execution's enable state from the "More" menu
LogsJump to the device execution's execution log page from the "More" menu

The status dot in the top-left of each card shows the enable state (green = enabled, red = disabled); a running device execution shows its progress.

Notes

  • Deleting a Scheduled Task removes the trigger for all Device Actions that reference it — unbind first before deleting
  • Editing the cron expression takes effect immediately; the next trigger time is recalculated from the new expression
  • Schedules run in the server's local timezone