Scheduled Queries

Scheduled queries are queries that you can configure to run automatically. Using the Schedule query function, you can set its duration and frequency. Duration is how long the query remains active, and frequency is how many times the query is executed during that time. These queries are run across many devices, any of which can be taken offline.

Orbital node is a device that polls the Orbital Service at predefined intervals or upon returning online.

Results from Scheduled queries can be viewed on the Results page.

How to schedule a query

  1. Create the query and click Schedule query.

    The default schedule is to run the job once every 24 hours.

  2. In the Schedule query pop-up window, define the query's schedule. For this:

    1. Enter the query's name in the Name field or use the default one. This is the name that will appear on the Results page.

    2. Set the query's frequency from Every drop-down menu.

    3. Set the query schedule's duration from For drop-down menu.

    4. Select the Run once toggle to run the query's schedule once in the next 24 hours.

      Selecting this toggle will clear any values you set for the Every and For drop-down menus.

    5. Use the Remote data store drop-down menu to choose where the query results will be sent. If you want to select more than one remote data store source, refer to the Setting Up Remote Data Stores page.

    6. Select the Save empty results toggle to include query results where the device has not returned any result values.

    7. Use the Add remote data store link if the data stores you need are not listed in the Remote Data Store drop-down menu. Clicking this link opens the Administration section and displays the Remote Data Store page. Refer to the Remote Data Stores page for more information.

    8. Select Go to Result toggle to open the Results page and display the query results for that job once you have started the query run.

  3. Start or cancel the query's schedule.

    • Click Schedule to begin running the query's schedule. Once you have started the query, you can see it listed on the Results page.

    • Click Cancel to abandon the query's schedule. Clicking this button will discard any parameters you might have set.

How to Select Multiple Remote Data Stores

To assign more than one remote data store to a query's schedule:

  1. Click the Remote data store drop-down menu to expand it.

  2. Select the needed remote data store. It will appear in the Remote data store field.

  3. Expand the Remote data store drop-down menu again.

  4. Navigate to the next desired remote data store listing and select it.

To delete a remote data store listing, click the X icon on the data store's name.

Scheduled Query Behavior

Because devices can be taken offline and returned online at potentially random times, the Orbital scheduler cannot schedule a query to run every 10 minutes for 10 days across all devices that are online at that moment.

Instead, it must make allowances for all nodes that are offline or taken offline when the query is scheduled to run. To accommodate this, the scheduler will place the query or queries in a queue for a given node to be run at the specified interval (e.g., every 15 minutes). The node will retrieve and run the query at the designated interval. If the node has been taken offline before the query can be run, once the node returns online, it will retrieve and run the queued query. This results in some nodes not running the query at the specified interval but running it later instead.

For example, a user creates a query scheduled to start at 1 p.m., run every 15 minutes for 10 days, across 100 nodes running a mixture of operating systems. During the initial query run, all devices are online and successfully return the query's results. However, during the second run, made at 1:15 p.m., two devices are offline and return online at 1:18 p.m. In this instance, two nodes installed on the devices will run the script at 1:18 p.m. and every 15 minutes thereafter. This three-minute offset to the query execution schedule will remain in place until the query's duration expires. The other 98 devices will run the script at the scheduled time.

More Info