Loading

Runner

A runner is a scheduled WarpScript which runs at a repeating interval. This feature is enabled by default in Warp 10, you will find an example here: /opt/warp10/warpscripts/test/60000/runner.mc2.DISABLE.

Since Warp 10 2.11.0, advanced scheduling is available with two functions that allow to change the scheduling from WarpScript: RUNNERIN and RUNNERAT. You can set the next run from the current run.

See also Server side macros

Runner configurations

In the /path/to/warp10/etc/conf.d/10-runner.conf file, the directory containing runners is configured by:

runner.root = ${standalone.home}/warpscripts
runner.nthreads = 1
runner.scanperiod = 60000
runner.minperiod = 1000
  • runner.root: Runner directory.
  • runner.nthreads: Number of threads to use for running scripts.
  • runner.scanperiod: How often (in ms) to scan runner repository for new scripts.
  • runner.minperiod: Minimum period at which a script can be scheduled. Any script scheduled more often than that won't be run

Runners are mc2 files deployed in a sub directory in Warp 10 Analytics Engine, for example: /path/to/warp10/warpscripts/domain/3600000/macro.mc2

The sub directory 3600000 of domain is the interval of executions in ms.

Runner usage

Basic usage is detailed here and here.

The advanced scheduling is detailed in this article.

Limitations

As runners can be distributed, there is no way to keep the same stack context from one execution to the next one. If you want to let data in RAM for the next execution, you can use SHM (SHared Memory) extension.

The advanced scheduling, the $runner.execution.count variable, are only available on Warp 10™ standalone version.