Create function schedules. Function schedules trigger asynchronous calls with specific input data, based on a cron expression that determines when these triggers should be fired. Use e.g. http://www.cronmaker.com to be guided on how to generate a cron expression. One of FunctionId
or FunctionExternalId
(deprecated) must be set (but not both). When creating a schedule with a session, i.e. with a nonce
, FunctionId
must be used. The nonce
will be used to bind the session before function execution, and the session will be kept alive for the lifetime of the schedule. WARNING: Secrets or other confidential information should not be passed via the data
object. There is a dedicated secrets
object in the request body to "Create functions" for this purpose.
required | Array of objects (FunctionSchedule) = 1 items |
Created
The response for a failed request.
{- "items": [
- {
- "name": "My schedule",
- "description": "This is a nice schedule",
- "cronExpression": "* * * * *",
- "functionId": 1,
- "functionExternalId": "my.known.id",
- "data": {
- "timeSeriesId1": 13435351,
- "maxValue": 4
}, - "nonce": "string"
}
]
}
{- "items": [
- {
- "id": 1,
- "name": "My schedule",
- "createdTime": 1730204346000,
- "description": "This is a nice schedule",
- "cronExpression": "* * * * *",
- "when": "Every hour",
- "functionId": 1,
- "functionExternalId": "my.known.id",
- "sessionId": "string"
}
]
}