Skip to content

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:

Terminal window
ndcli sync apply --ou branch-offices --schedule nightly-maintenance
ndcli run restart --ou staging --schedule monday-reboot
ndcli backup config set --schedule nightly-maintenance

Each of these produces a scheduled task that you can see, pause, and remove.

Terminal window
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 │
╰──────────┴───────────────┴──────────────────────┴────────────────────────────────┴─────────╯
Terminal window
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.

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.

Terminal window
ndcli schedule tasks enable <code>
ndcli schedule tasks disable <code>

In NDWeb, use the toggle on the Scheduled Specs row.

Terminal window
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.

When a schedule fires:

  1. NetDefense resolves the target set defined at creation time — the OU members, device list, or --org flag that was in effect when the task was created.
  2. One task per resolved device is enqueued with status PENDING.
  3. 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:

Terminal window
# All recent SYNC tasks
ndcli task list --type SYNC --created-after 24h
# All tasks from the last hour across all types
ndcli task list --created-after 1h
# Filter by multiple statuses — see failed or expired recurring tasks
ndcli task list --type BACKUP --status FAILED
ndcli task list --status EXPIRED --created-after 7d

Multi-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.

CommandDescription
ndcli schedule tasks listList 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.