Scheduling

NetXMS includes a built-in task scheduler for running recurring and one-time operations. Tasks can execute NXSL scripts, maintenance windows, report generation, and other server-side operations.

Scheduled Tasks

Viewing Scheduled Tasks

Navigate to Configuration > Scheduled Tasks in the management client to view all configured tasks.

The view has the following columns:

  • ID

  • Schedule Type

  • Object

  • Parameters

  • Timer key

  • Execution time

  • Execution time description

  • Last execution time

  • Execution status

  • Administrative status

  • Owner

  • Comments

Filter options control whether completed tasks, disabled tasks, and system tasks are shown in the list. The Reschedule…​ action, available for one-time tasks, creates a new task with the same settings and a new execution time — for example, to run a completed one-time task again; the original task remains in the list.

Creating a Scheduled Task

  1. Navigate to Configuration > Scheduled Tasks

  2. Select New scheduled task…​

  3. Configure the task parameters:

Field Description

Task type

Type of operation to perform (drop-down list)

Select execution object

Target object for the task (if applicable)

Parameters

Task-specific parameters

Description

Optional description of the task

Schedule

One-time execution at a specific date and time, or a recurring schedule — with presets for every N minutes, hourly, daily, weekly, and monthly runs, or a custom cron expression

To temporarily disable a task without deleting it, use the enable/disable actions in the task list — there is no such option in the dialog.

Task Types

NetXMS supports the following scheduled task types:

Type Description

Execute.Script

Run an NXSL script from the script library

Execute.Action

Execute a server action

Execute.AIAgentTask

Send a prompt to the AI assistant, optionally in the context of the selected object

Agent.ExecuteCommand

Execute a command on a node through the agent

Agent.DeployPackage

Deploy an installation package to a node

Upload.File

Upload a file from the server file store to a node

Maintenance.Enter

Put an object into maintenance mode

Maintenance.Leave

Take an object out of maintenance mode

Report.Execute

Generate a report on the reporting server

Traffic.ConfigSync

Synchronize configuration to traffic analyzers

Dummy

No-operation task

Each task type requires a corresponding system access right (for example, scheduling maintenance requires the Schedule object maintenance right), plus access rights on the target object.

Schedule Format

Recurring schedules are stored as cron expressions; the task dialog offers preset recurrence modes (every N minutes, hourly, daily, weekly, monthly) that generate the expression, or a custom cron expression can be entered directly. A cron expression consists of five or six space-separated fields defining when the task should run:

minute hour day-of-month month day-of-week [seconds]
Table 1. Common examples
Expression Meaning

0 * * * *

Every hour at minute 0

*/15 * * * *

Every 15 minutes

0 8 * * 1-5

Every weekday at 08:00

0 0 1 * *

First day of every month at midnight

30 2 * * 0

Every Sunday at 02:30

See Cron Format Reference for the complete field definitions, special characters (L, #, /), and additional examples including the 6-field format with seconds.

For one-time tasks, specify an exact date and time instead of a cron expression.

Scheduled Maintenance Windows

Maintenance mode prevents alarms and notifications for an object during planned maintenance while polling and data collection continue. For what exactly happens to events during maintenance, and for manual maintenance control, see Maintenance Mode.

The easiest way to schedule a maintenance window is from the object itself: right-click the object and select Maintenance > Schedule maintenance…​. The dialog supports both a one-time window (start and end time) and a recurring window (cron schedule plus duration in minutes).

Recurring windows can also be configured directly as scheduled tasks. A recurring Maintenance.Enter task can carry the window duration, in which case the server schedules the matching exit automatically and no separate Maintenance.Leave task is needed. Alternatively, create an explicit pair of tasks:

Table 2. Example: Weekly maintenance window (Sunday 02:00 - 06:00)
Task Schedule Object

Maintenance.Enter

0 2 * * 0

Server Room A

Maintenance.Leave

0 6 * * 0

Server Room A

Objects with a pending maintenance window are marked [Maintenance scheduled] in the management client.

Script Execution

Scheduled NXSL script execution allows you to automate administrative tasks:

  1. Create an NXSL script in the script library (Configuration > Script Library)

  2. Create a scheduled task with type Execute.Script

  3. Enter the script name in the Parameters field — optionally with arguments, using the form scriptName(arg1, arg2) — and optionally select a target object

The script runs in the context of the selected object (if any), allowing access to the object’s properties and methods. See NXSL Reference for scripting documentation.

Managing Scheduled Tasks via API

Scheduled tasks can also be managed through the NetXMS REST API. See REST API for details.

System-Level Scheduling

Some server operations are driven by configuration variables rather than scheduled tasks:

Operation Default Schedule Configuration Variable

Housekeeping

02:00 daily

Housekeeper.StartTime

LDAP synchronization

Configurable

LDAP.SyncInterval

Network discovery

Configurable

Per discovery configuration

Other internal operations run as system scheduled tasks, visible in the Scheduled Tasks view when system tasks are shown by the filter. They are created with a default schedule on first server start; the schedule (but not the task type or parameters) can be edited, and manual changes persist:

Task Default Schedule Notes

Agent tunnel certificate renewal

12:00 daily

Which certificates are renewed is controlled by AgentTunnels.Certificates.ReissueInterval

Unbound tunnel processing

Every 5 minutes

The timeout applied to unbound tunnels is AgentTunnels.UnboundTunnelTimeout (seconds)

CRL reload

Every 4 hours

See Server Configuration for details.

The server does not run a database consistency check automatically. At startup it only verifies that the database schema version matches the server version and refuses to start on mismatch. A consistency check runs only when started manually with nxdbmgr check. Launching the server with netxmsd -e also runs a check before startup, but in unattended force-repair mode, which applies fixes without asking for confirmation — prefer running nxdbmgr check interactively.