> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/~/changes/Sh4xqs4GDClkDKT9Hvux/user-guide/remote-actions/managing-remote-actions/scheduling-remote-actions.md).

# Scheduling Remote Actions

The Remote Actions module lets you schedule remote actions for your remediation and data collection needs, at the frequency that best suits each specific use case.

## Scheduling remote actions <a href="#schedulingremoteactions-schedulingremoteactions" id="schedulingremoteactions-schedulingremoteactions"></a>

Select the schedule type that is most suitable for your use case.

| Schedule options                   | Centrally scheduled                                                                                                                                                                     | Locally scheduled                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Supported frequencies              | Hourly, Daily and Weekly.                                                                                                                                                               | Minutes (minimum every 10 minutes up to 45 minutes).                                                                                                                                                                                                                                                                                                                                                                      |
| Scheduling limits                  | Schedule up to 100 remote actions.                                                                                                                                                      | Schedule up to 10 remote actions with a frequency of less than 1 hour.                                                                                                                                                                                                                                                                                                                                                    |
| Compatible with triggers           | Compatible with other triggers.                                                                                                                                                         | Not compatible with manual or API triggers.                                                                                                                                                                                                                                                                                                                                                                               |
| Supported platforms                | Windows and macOS                                                                                                                                                                       | Windows                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Execution time                     | Execution time between the triggering time and the next iteration: If a device is activated after the scheduled time, the system executes the remote action provided it is still valid. | Precise timing based on the local time: If the device is off during the execution, the system will skip the execution.                                                                                                                                                                                                                                                                                                    |
| Change of targeting and scheduling | For each evaluation of the remote action, the system immediately executes all devices returned by the investigation.                                                                    | <p>Devices receive schedules when creating or updating the remote action. The investigation occurs every 1 hour.</p><p>Deleting schedules on devices may require up to 90 minutes to become effective.</p>                                                                                                                                                                                                                |
| Monitoring                         | Execution details, including *in progress* and *waiting for device* information, available in `remote_action.executions` . This includes visibility in remote action dashboards.        | <p>Completed executions, success and failure, available in <code>remote\_action.executions</code>. This includes visibility in remote action dashboards.</p><p>Scheduling state execution available in <code>remote\_action.local\_schedules</code>.</p><p>Refer to the <a href="#schedulingremoteactions-monitoring-locally-scheduled">Monitoring locally scheduled remote actions</a> section for more information.</p> |

{% hint style="info" %}
Nexthink recommends using locally scheduled remote actions after your Collector agents are all updated to 24.4 or later. Devices with Collector versions 24.4 or later are the only ones that execute locally scheduled remote actions.
{% endhint %}

If you want to adjust the scheduling of a remote action from **Centrally scheduled** to **Locally scheduled** or vice versa, ensure you delete the first existing schedule and re-create a new schedule after changing the scheduling type.

### Considerations for NQL queries used in Schedule <a href="#schedulingremoteactions-considerationsfornqlqueriesusedinschedule" id="schedulingremoteactions-considerationsfornqlqueriesusedinschedule"></a>

When scheduling a remote action, whether locally or centrally, use NQL queries that target only those devices where the remote action is relevant. This approach minimizes the number of pending executions and avoids unnecessary executions due to the device not meeting the criteria of the remote action’s intent.

The table below provides the conditions to include in your queries.

| **Type of conditions**                                | **Description**                                                                                                                                                                                                                                                                                                     | **Example**                                                                                                                |                                                                                                                                                                                                     |                                                                                                     |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| <p> </p><p> </p><p>Platform and operating system</p>  | <p>Consider if the remote action applies only to a given platform, Windows or macOS, or a specific version(s) of an operating system.</p><p>For Locally scheduled remote actions, always specify a condition on the platform, as they currently support only Windows endpoints.</p>                                 | <p>Windows script:</p><p><code>                                                                                            | where operating\_system.platform == windows</code><br></p><p></p><p>Windows 11 script:<br><code>                                                                                                    | where operating\_system.platform == windows and operating\_system.name == "Windows 11\*"</code></p> |
| <p> </p><p>Device type</p>                            | Consider whether the remote action targets virtual, physical or laptop devices.                                                                                                                                                                                                                                     | <p>Physical device:</p><p><code>                                                                                           | where hardware.type != virtual</code><br><br><br>Laptop devices:</p><p><code>                                                                                                                       | where hardware.type == laptop</code></p>                                                            |
| <p> </p><p>Online devices and active user session</p> | <p>Always include a condition that only recently online devices are considered. This is especially pertinent to remote actions scheduled at daily frequencies or those scheduled less frequently.</p><p>Only consider devices with recent user session activity for remote actions running in the user context.</p> | <p>Limit hourly-scheduled remote actions to devices reporting an activity in the past 60 minutes.</p><p><code>             | with execution.events past 60min</code><br><br><br>Limit hourly scheduled remote actions for the currently logged-in user to those devices with an active user in the past 60 minutes.</p><p><code> | with session.events past 60min</code></p>                                                           |
| Installed software package                            | Consider whether the remote action requires the installation of a specific software package on the device.                                                                                                                                                                                                          | <p>Limit a remote action for remediation of Microsoft Teams issues to devices with Microsoft Teams installed.</p><p><code> | with package.installed\_packages</code> </p><p><code>                                                                                                                                               | where package.name == "Microsoft Teams\*"</code></p>                                                |

\
**Example of a non-recommended query:**

The query will not filter out devices based on recent device activity nor any technical dependency such as platform, hardware type, operating system, or software, and is likely to result in several executions timing out or ending in failure.

```
devices
| where entity == "ABC"
```

### **Example of a query following the previous recommendation:**

Consider the following remote action used to remediate issues encountered by Virtual Desktop Infrastructure (VDI) users of a critical business application used exclusively by the sales team, intended to run for a frequency of 1 hour.

```
devices past 60min
| where hardware.type == virtual and operating_system.platform == windows
| with session.events past 60min
| where user.ad.department == "Sales"
| with package.installed_packages
| where package.name == "MyBusinessApp"
```

The query includes precise conditions matching those devices where the remediation is relevant, resulting in fewer executions experiencing errors or reporting no impact due to missing dependencies. The query is also limited to those virtual devices where an interactive user from the relevant department has been recently active, resulting in fewer irrelevant timeouts.

### Monitoring locally scheduled remote actions <a href="#schedulingremoteactions-monitoringlocallyscheduledremoteactionsmonitoring-locally-scheduled" id="schedulingremoteactions-monitoringlocallyscheduledremoteactionsmonitoring-locally-scheduled"></a>

Locally scheduled remote actions report their results to the platform using the regular `remote_action.executions` table. Unlike Centrally scheduled and on-demand executions, the `request_id` is not unique per execution. The `request_id` is the same for all executions corresponding to the same schedule on the same device.

Use `remote_action.local_schedules` to monitor the status of schedule configurations for each device. This returns a detailed overview of the local schedule created on all devices, their current states and any pending actions.

See the table below for more information.

| Schedule status    | Description                                                                                                                                                                                                                                                                                                                                                                 | Possible pending action                                                                                                                                                          |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Waiting for device | The schedule configuration is waiting for the device to be online.                                                                                                                                                                                                                                                                                                          | Configure - The system is waiting for the device configuration to be successful.                                                                                                 |
| Configuring        | The schedule configuration was sent to the device and wait for the device response.                                                                                                                                                                                                                                                                                         | Configure - The system is waiting for the device configuration to be successful.                                                                                                 |
| Active             | The schedule configuration was successful. The Locally scheduled remote action is currently being executed on the device.                                                                                                                                                                                                                                                   | <p>None: No pending changes.</p><p>Configure: A reconfiguration is pending.</p><p>Delete schedule: The schedule is not valid anymore, and the system will remove the device.</p> |
| Deleted            | The schedule configuration was successfully deleted and the current schedule will not execute the Locally scheduled remote action on the device.                                                                                                                                                                                                                            | None: No pending changes.                                                                                                                                                        |
| Failed             | <p>The schedule configuration on the devices has failed for technical reasons.</p><p>Examples of failures include:</p><ul><li>The Collector version does not support Locally scheduled remote actions.</li><li>Locally scheduled remote actions are not supported on device platforms such as MacOS.</li><li>Other technical failures when creating the schedule.</li></ul> | Configure: The system may try to reconfigure the device.                                                                                                                         |

Use the following NQL query to identify the number of devices in each configuration state for a given remote action.

```
remote_action.local_schedules
| where remote_action.name == "<some remote action name>"
| summarize device_count = device.count() by local_schedule.name, state, pending_action
| sort state asc
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nexthink.com/platform/~/changes/Sh4xqs4GDClkDKT9Hvux/user-guide/remote-actions/managing-remote-actions/scheduling-remote-actions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
