Scheduled Tasks
A scheduled task (also called a scheduled spec in the web console) is a recurring operation: a command, a target set, and a schedule bound together. Once created, it fires automatically on every tick of the attached schedule until you disable or remove it.
Scheduled tasks are created implicitly when you attach a --schedule flag to a command:
ndcli sync apply --ou branch-offices --schedule nightly-maintenancendcli run restart --ou staging --schedule monday-rebootndcli backup config set --schedule nightly-maintenanceEach of these produces a scheduled task that you can see, pause, and remove.
Viewing scheduled tasks
Section titled “Viewing scheduled tasks”ndcli schedule tasks list╭──────────┬───────────────┬──────────────────────┬────────────────────────────────┬─────────╮│ Code │ Type │ Schedule │ Target │ Enabled │├──────────┼───────────────┼──────────────────────┼────────────────────────────────┼─────────┤│ a1b2c3d4 │ SYNC │ nightly-maintenance │ OU: branch-offices │ Yes ││ e5f6g7h8 │ RESTART │ monday-reboot │ OU: staging │ Yes ││ i9j0k1l2 │ BACKUP │ nightly-maintenance │ Org: example-org │ Yes ││ m3n4o5p6 │ PLUGIN_INSTALL│ monthly-audit │ Org: example-org │ No │╰──────────┴───────────────┴──────────────────────┴────────────────────────────────┴─────────╯ndcli schedule tasks describe <code>The Tasks page has a Scheduled Specs tab listing all recurring tasks in the active organization. Each row shows the task type, the schedule name, the target, and an enabled/disabled toggle. Click a row to see full details.
Enabling and disabling scheduled tasks
Section titled “Enabling and disabling scheduled tasks”You can pause a specific recurring task without touching its schedule. This is useful when you want to stop one automated operation while keeping others that share the same schedule running.
ndcli schedule tasks enable <code>ndcli schedule tasks disable <code>In NDWeb, use the toggle on the Scheduled Specs row.
Removing a scheduled task
Section titled “Removing a scheduled task”ndcli schedule tasks remove <code>Removing a scheduled task stops future executions permanently. The schedule itself is not affected and can be reused for other operations.
How execution works
Section titled “How execution works”When a schedule fires:
- NetDefense resolves the target set defined at creation time — the OU members, device list, or
--orgflag that was in effect when the task was created. - One task per resolved device is enqueued with status
PENDING. - Each task flows through the normal dispatch pipeline — you can monitor them on the Tasks page or via
ndcli task list.
Filtering ndcli task list for scheduled executions
Section titled “Filtering ndcli task list for scheduled executions”Each execution of a recurring task produces normal task records. To see recent runs from a specific scheduled task, filter by code or type:
# All recent SYNC tasksndcli task list --type SYNC --created-after 24h
# All tasks from the last hour across all typesndcli task list --created-after 1h
# Filter by multiple statuses — see failed or expired recurring tasksndcli task list --type BACKUP --status FAILEDndcli task list --status EXPIRED --created-after 7dMulti-value filtering: --status and --type each accept a single value; run separate queries or use --created-after to narrow the window if you need to spot specific patterns.
Reference
Section titled “Reference”| Command | Description |
|---|---|
ndcli schedule tasks list | List all scheduled tasks in the organization |
ndcli schedule tasks describe <code> | Show details for one scheduled task |
ndcli schedule tasks enable <code> | Enable a scheduled task |
ndcli schedule tasks disable <code> | Disable a scheduled task |
ndcli schedule tasks remove <code> | Remove a scheduled task permanently |
See also Schedules for managing the named cadences that drive scheduled tasks.