owner.scripts

Scripts owner

type

object

properties

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

  • isTemplateGeneratedByOspComposer

If the value is set to true, manual editing of this file should be avoided, as the composer will override the value in the next generation.

type

boolean

  • moduleId

The script module ID who own this item

type

string

  • sourceCode

The raw source code of the script.

This is exclusive with the sourceFile field.

type

string

  • sourceFile

The path of the file containing the source code of the script.

The file is not needed on the module.resource file.

This is exclusive with the sourceCode field.

type

string

  • accessedValues

The list of values read by the script, in addition to triggers.

The wildcard ‘*’ can be used to match multiple value. For example, ‘root.*.test’ will match ‘root.device.1.test’, ‘root.server.test’.

type

array

default

items

type

string

  • scheduledExecutions

The list of cron expression ↗️ to schedule the script execution.

The expected format is <Seconds> <Minutes> <Hours> <Day of month> <Month> <Day of week> <Year>.

For example, the following expression schedule one execution every:

  • seconds: * * * ? * * *

  • 10 seconds: 0/10 * * ? * * *

  • monday at 13:00: 0 0 13 ? * MON *

  • every hour at 0 and 30 minutes: 0 0,30 * ? * * *

  • every first day of each month: 0 0 0 1/1 * ? *

The / can be used to specify a start time and an interval (every x seconds starting at y second).

The , can be used to define the multiple execution points (At 10, 25, 45 seconds).

The ? is only used for the field Day of month and Day of week because they are mutually exclusive. For example, setting an execution on the first day of every month and every Monday on the same expression is not valid, so one of them will have a ? instead.

type

array

default

items

type

string

  • maxPendingScriptsNumber

The maximum of script execution kept in memory, see the documentation of OnSphere for more details about the scheduling of scripts.

When this value is reached the backpressure strategy is applied.

type

integer

minimum

1

default

100

  • backpressureStrategy

How script execution are drop when the buffer is full

type

string

enum

DROP_OLDEST, DROP_LATEST

default

DROP_OLDEST

additionalProperties

False

oneOf

allOf

not

allOf

not