Create a business-function schedule.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/admin/function-schedules"), Content = new StringContent("{ \"Name\": \"example\", \"BusinessFunctionId\": \"example\", \"TimeZone\": \"example\", \"CronExpression\": \"example\", \"Args\": {}, \"Status\": 0, \"TimeoutSeconds\": 1 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/admin/function-schedules';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"Name":"example","BusinessFunctionId":"example","TimeZone":"example","CronExpression":"example","Args":{},"Status":0,"TimeoutSeconds":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/admin/function-schedules \ --header 'Content-Type: application/json' \ --data '{ "Name": "example", "BusinessFunctionId": "example", "TimeZone": "example", "CronExpression": "example", "Args": {}, "Status": 0, "TimeoutSeconds": 1 }'Schedule occurrences never overlap active queued or running work for their target function.
An overlapping occurrence is recorded as Skipped instead of creating a parallel job.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Request payload to create a business-function schedule.
object
Schedule name.
Published global function identifier.
Optional schedule time zone identifier; empty values inherit the workspace time zone.
Cron expression.
Optional JSON arguments exposed as ctx.args.
object
Maximum duration for one scheduled occurrence; defaults to 60 seconds.
Request payload to create a business-function schedule.
object
Schedule name.
Published global function identifier.
Optional schedule time zone identifier; empty values inherit the workspace time zone.
Cron expression.
Optional JSON arguments exposed as ctx.args.
object
Maximum duration for one scheduled occurrence; defaults to 60 seconds.
Request payload to create a business-function schedule.
object
Schedule name.
Published global function identifier.
Optional schedule time zone identifier; empty values inherit the workspace time zone.
Cron expression.
Optional JSON arguments exposed as ctx.args.
object
Maximum duration for one scheduled occurrence; defaults to 60 seconds.
Responses
Section titled “Responses”OK
object
Business-function schedule configuration.
object
Schedule identifier.
Schedule name.
Published global function identifier.
Explicit schedule time zone identifier; null inherits the workspace time zone.
Cron expression.
Optional JSON arguments exposed as ctx.args.
object
Next eligible run timestamp.
Last enqueue or execution activity timestamp.
Last enqueue, job, or run status.
Last enqueue, job, or run error summary.
Target-resolution error for broken schedules.
Timestamp when target resolution broke.
Maximum duration for one scheduled occurrence.
Optimistic concurrency token.
Retry-control state for a schedule job that is still queued or leased.
object
Queued job identifier.
Concurrency token required by the stop-retries command.
Current persisted attempt number.
Retry limit snapshotted for this job.
Attempts still permitted by the snapshot.
Delay before another attempt.
Next eligible attempt timestamp.
Whether the job is currently waiting for or executing an attempt that may retry.
Whether an administrator can stop this retry chain.
object
object
object
object
Example
{ "Data": { "Status": 0, "TargetState": 0, "ActiveJob": { "Status": 0, "RetryStopState": 0 } }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Business-function schedule configuration.
object
Schedule identifier.
Schedule name.
Published global function identifier.
Explicit schedule time zone identifier; null inherits the workspace time zone.
Cron expression.
Optional JSON arguments exposed as ctx.args.
object
Next eligible run timestamp.
Last enqueue or execution activity timestamp.
Last enqueue, job, or run status.
Last enqueue, job, or run error summary.
Target-resolution error for broken schedules.
Timestamp when target resolution broke.
Maximum duration for one scheduled occurrence.
Optimistic concurrency token.
Retry-control state for a schedule job that is still queued or leased.
object
Queued job identifier.
Concurrency token required by the stop-retries command.
Current persisted attempt number.
Retry limit snapshotted for this job.
Attempts still permitted by the snapshot.
Delay before another attempt.
Next eligible attempt timestamp.
Whether the job is currently waiting for or executing an attempt that may retry.
Whether an administrator can stop this retry chain.
object
object
object
object
Example
{ "Data": { "Status": 0, "TargetState": 0, "ActiveJob": { "Status": 0, "RetryStopState": 0 } }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}