Configuration parameters

RUNNERAT has no effect has soon as runner.endpoint configuration is defined (typically on Warp 10 distributed version).

Runners period is defined by the path of the WarpScript file. Typically, /opt/warp10/warpscripts/myapp/60000/myrunner.mc2 will be scheduled every 60 seconds, starting at the Warp 10 instance start. RUNNERAT allow to dynamically schedule the next run to an absolute timestamp before the period defined in the path. Combined with RUNNERIN, RUNNERAT can be used to schedule the next run to an absolute timestamp whatever the period defined in the path. See examples below.

RUNNERAT careless use may bring problems: If a runner is planified every hour, and the execution time is 10 minutes, calling RUNNERAT to reschedule the runner every minute will lead to saturate a runner thread. That's why the usage is restricted to a capability. Use CAPADD to add runner.reschedule.min.period capability from a read or write token at runtime.

runner.reschedule.min.period capability must contain the minimum of millisecond offset to now allowed for RUNNERAT. See example below. This capability also overrides runner.minperiod configuration.

Examples are available here on our blog.

RUNNERAT is available since version 2.10.2.

See also



// first, generate a token with 10000 millisecond reschedule capability: { 'id' 'Token' 'type' 'READ' 'application' 'noapp' 'owner' UUID 'producer' UUID 'expiry' NOW 1 ADDYEARS 'labels' { } 'attributes' { '.cap:runner.reschedule.min.period' '10000' } } 'secret' TOKENGEN
// this is an runner example that write to Warp 10 logs. Copy paste it to /opt/warp10/warpscripts/test/60000/test.mc2 // Activate STDOUT with the debug extension by adding this line to your /opt/warp10/etc/conf.d/99-custom.conf: // warpscript.extension.debug=io.warp10.script.ext.debug.DebugWarpScriptExtension // // Then, look at Warp 10 logs (sudo journalctl -f -u warp10.service) "the token with the runner.reschedule.min.period capability" CAPADD // if you want to check the capability: // "runner.reschedule.min.period" CAPGET 'hello from runner at' NOW ISO8601 + STDOUT $runner.execution.count 0 == // first run ? <% // I want this runner to be started every minutes at 00 seconds: NOW ->TSELEMENTS [ 0 4 ] SUBLIST TSELEMENTS-> 2 m + 'nextRunTs' STORE MAXLONG RUNNERNEXT // disable the 60s period defined by the runner path $nextRunTs RUNNERPROG // program next run 'first run, rescheduled next run at ' $nextRunTs ISO8601 + STDOUT %> IFTE