NetXMS icon

NetXMS

Interact with the NetXMS network monitoring and management system

Scheduled Task → Update

AI-generated

Summary

Updates an existing NetXMS scheduled task by ID, sending only the fields you set (handler, cron schedule or one-time execution time, object, parameters, comments) via a PUT request.

Inputs

  • taskId (required) — Numeric ID of the scheduled task to update.
  • updateFields.taskHandler — Name of the registered task handler to invoke.
  • updateFields.schedule — Cron expression for recurring runs (e.g. 0 * * * *). Use this or Execution Time, not both.
  • updateFields.executionTime — Unix timestamp for one-time execution. A value of 0 is treated as unset and dropped from the request, so it can't be used to clear a time.
  • updateFields.objectId — Object ID to associate with the task.
  • updateFields.parameters — Task parameters string; format depends on the handler.
  • updateFields.comments — Comments about the task.

Output shape

The server's JSON response to PUT /v1/scheduled-tasks/{taskId}, emitted as one or more items per input item (an array response becomes multiple items).

The node logs in per execution using the credentials' username and password to obtain a session token. Fields left unset in the collection aren't sent. Other falsy values such as an empty string or objectId 0 are still sent as set. With Continue On Fail enabled, errors are returned as an item with an error message.

Examples

Example 1: Change a task's cron schedule to run daily at 02:00

Task ID = 12; Update Fields: Cron Schedule = '0 2 * * *'

Example 2: Reschedule a task as a one-time run and add a note

Task ID = 7; Update Fields: Execution Time = 1767225600, Comments = 'Run once after maintenance window'

Links

Discussion