NetXMS icon

NetXMS

Interact with the NetXMS network monitoring and management system

Scheduled Task → Create

AI-generated

Summary

Creates a new server-side scheduled task in NetXMS by POSTing to /v1/scheduled-tasks, with either a recurring cron schedule or a one-time execution timestamp. Returns the server's response for the created task.

Inputs

  • taskHandler (required) — Name of the registered NetXMS task handler to invoke, e.g. Execute.Script.
  • scheduleType — Recurring (Cron), the default, or One-Time. Decides whether the request carries a cron schedule or an execution time.
  • schedule — Cron expression, default '0 * * * *'. Shown and sent only when Schedule Type is Cron.
  • executionTime — Unix timestamp of the single run, default 0. Shown and sent only when Schedule Type is One-Time.
  • additionalFields — Optional collection: Comments, Object ID (object to associate with the task, 0 for none), and Parameters (handler-specific string). Any fields you add are passed straight into the request body.

Output shape

One item per input item, containing the JSON response from the NetXMS REST API for the newly created scheduled task.

The exact response fields depend on the NetXMS server. The node logs in per execution using the stored credentials. If 'Continue on Fail' is enabled, a failed item returns {error: message} instead of stopping the workflow. The One-Time option does not check that the timestamp lies in the future.

Examples

Example 1: Run a script-handler task every night at 02:00

Task Handler: Execute.Script; Schedule Type: Recurring (Cron); Cron Schedule: 0 2 * * *; Additional Fields: Parameters set to the handler's expected string, Object ID set to the target object.

Example 2: Schedule a one-off task at a specific time

Task Handler: Execute.Script; Schedule Type: One-Time; Execution Time: Unix timestamp such as {{ Math.floor(Date.now()/1000) + 3600 }}; Additional Fields: Comments: 'one-off run'.

Links

Discussion