Scheduled Task - Create Cloud Script Task

Create a CloudScript task, which can run a CloudScript on a schedule.

POST https://titleId.playfabapi.com/Admin/CreateCloudScriptTask

Request Header

Name Required Type Description
X-SecretKey True

string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
IsActive True

boolean

Whether the schedule is active. Inactive schedule will not trigger task execution.

Name True

string

Name of the task. This is a unique identifier for tasks in the title.

Parameter True

CloudScriptTaskParameter

Task details related to CloudScript

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Description

string

Description the task

Schedule

string

Cron expression for the run schedule of the task. The expression should be in UTC.

Responses

Name Type Description
200 OK

CreateTaskResult

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

CloudScriptTaskParameter
CreateCloudScriptTaskRequest

Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many create-task requests within a short time will cause a create conflict error.

CreateTaskResult

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

CloudScriptTaskParameter

Name Type Description
Argument

object

Argument to pass to the CloudScript function.

FunctionName

string

Name of the CloudScript function to execute.

CreateCloudScriptTaskRequest

Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many create-task requests within a short time will cause a create conflict error.

Name Type Description
CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Description

string

Description the task

IsActive

boolean

Whether the schedule is active. Inactive schedule will not trigger task execution.

Name

string

Name of the task. This is a unique identifier for tasks in the title.

Parameter

CloudScriptTaskParameter

Task details related to CloudScript

Schedule

string

Cron expression for the run schedule of the task. The expression should be in UTC.

CreateTaskResult

Name Type Description
TaskId

string

ID of the task

Error Codes

Name Code
InvalidScheduledTaskName 1256
InvalidTaskSchedule 1257
ScheduledTaskCreateConflict 1255
ScheduledTaskNameConflict 1254