ManagementFunctions
Add a schedule to a function on the branch
POST
At each due time the function's scheduled(controller, env, ctx) handler runs once, with controller.cron and controller.scheduledTime, while the function is enabled on the branch. A cron has 5 fields (minute granularity); ticks missed while the worker was down run once. A new branch inherits the schedules.
Authorization
bearer AuthorizationBearer <token>
In: header
Path Parameters
id*string
Database id
Format
uuidbranch_id*string
Branch id
Format
uuidname*string
Function name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
cron*string
5 fields (minute granularity), e.g. */15 * * * *.
timezone?|
IANA time zone, e.g. Europe/London; defaults to UTC.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08/functions/string/schedules" \ -H "Content-Type: application/json" \ -d '{ "cron": "string" }'{ "cron": "string", "enabled": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "next_run_at": "2019-08-24T14:15:22Z", "timezone": "string"}