Skip to content

task

Task management commands for NDCLI. Tasks are operations sent to devices such as ping, reboot, shutdown, and configuration sync.

Task Types

TypeDescription
PINGCheck device connectivity
SHUTDOWNShutdown the device
REBOOTReboot the device
RESTARTRestart the device service
PULLPull configuration from device
SYNCSync configuration to device

Task Statuses

StatusDescription
PENDINGTask created, waiting to be picked up
SCHEDULEDTask scheduled for future execution
IN_PROGRESSTask currently executing
COMPLETEDTask completed successfully
FAILEDTask failed
CANCELLEDTask was cancelled
EXPIREDTask expired before execution

Commands

CommandDescription
task listList tasks
task describeShow task details
task createCreate a task for a device
task cancelCancel a pending task

task list

List tasks in your organization.

Terminal window
ndcli task list [flags]

Flags

FlagTypeDefaultDescription
--devicestringFilter by device name (regex)
--statusstringFilter by status
--typestringFilter by task type
--expiredboolFilter by expired status
--created-afterstringFilter by created date
--created-beforestringFilter by created date
--sort-bystringcreated_at:descSort field and direction
--pageint1Page number
--per-pageint30Items per page (max 100)

Date Filter Formats

Date filters accept:

  • Relative: 30m, 2h, 7d, 2w (minutes, hours, days, weeks ago)
  • ISO 8601: 2024-01-15T10:30:00Z

Examples

Terminal window
ndcli task list
ndcli task list --created-after 1h
ndcli task list --device fw-prod-01
ndcli task list --status FAILED
ndcli task list --type SYNC
ndcli task list --status PENDING --sort-by created_at:asc

task describe

Show detailed information about a specific task.

Terminal window
ndcli task describe [task-id]

Arguments

ArgumentRequiredDescription
task-idYesTask ID

Output

Shows:

  • Task ID and type
  • Target device
  • Status and progress
  • Creation timestamp
  • Completion timestamp (if completed)
  • Result or error message

Examples

Terminal window
ndcli task describe abc123
ndcli task describe abc123 -f json

task create

Create a task for a device.

Terminal window
ndcli task create [device] [type]

Arguments

ArgumentRequiredDescription
deviceYesDevice name
typeYesTask type: PING, SHUTDOWN, REBOOT, RESTART

Task Types

TypeDescriptionImpact
PINGTest connectivityNone - diagnostic only
RESTARTRestart firewall serviceBrief service interruption
REBOOTFull system rebootComplete service interruption
SHUTDOWNShutdown the deviceDevice goes offline

Examples

Terminal window
ndcli task create fw-prod-01 PING
ndcli task create fw-staging-01 RESTART
ndcli task create fw-dev-01 REBOOT
ndcli task create decommissioned-fw SHUTDOWN

task cancel

Cancel a pending or scheduled task.

Terminal window
ndcli task cancel [task-id]

Arguments

ArgumentRequiredDescription
task-idYesTask ID to cancel

Examples

Terminal window
ndcli task cancel abc123

Notes

  • Only tasks with PENDING or SCHEDULED status can be cancelled
  • Tasks already IN_PROGRESS cannot be cancelled
  • Cancelled tasks have status CANCELLED