Scheduled Task - Update Task

Update an existing task.

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

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.

Type True

Task type.

CustomTags
  • object

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

Description
  • string

Description the task

Identifier

Specify either the task ID or the name of the task to be updated.

Parameter
  • object

Parameter object specific to the task type. See each task type's create API documentation for details.

Schedule
  • string

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

Responses

Name Type Description
200 OK
400 Bad Request

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

ApiErrorWrapper

The basic wrapper around every failed API response

EmptyResponse
NameIdentifier

Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is immutable and unique.

ScheduledTaskType
UpdateTaskRequest

Note that when calling this API, all properties of the task have to be provided, including properties that you do not want to change. Parameters not specified would be set to default value. If the task name in the update request is new, a task rename operation will be executed before updating other fields of the task. WARNING: Renaming of a task may break logics where the task name is used as an identifier.

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

EmptyResponse

NameIdentifier

Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is immutable and unique.

Name Type Description
Id
  • string

Id Identifier, if present

Name
  • string

Name Identifier, if present

ScheduledTaskType

Name Type Description
ActionsOnPlayerSegment
  • string
CloudScript
  • string
CloudScriptAzureFunctions
  • string
InsightsScheduledScaling
  • string

UpdateTaskRequest

Note that when calling this API, all properties of the task have to be provided, including properties that you do not want to change. Parameters not specified would be set to default value. If the task name in the update request is new, a task rename operation will be executed before updating other fields of the task. WARNING: Renaming of a task may break logics where the task name is used as an identifier.

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

Identifier

Specify either the task ID or the name of the task to be updated.

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
  • object

Parameter object specific to the task type. See each task type's create API documentation for details.

Schedule
  • string

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

Type

Task type.

Error Codes

Name Code
InvalidScheduledTaskName 1256
InvalidScheduledTaskParameter 1391
InvalidScheduledTaskType 1265
InvalidTaskSchedule 1257
ScheduledTaskCreateConflict 1255
ScheduledTaskNameConflict 1254
TaskNotFound 1261