maxAttempts property

int? maxAttempts
getter/setter pair

Number of attempts per task.

Cloud Tasks will attempt the task max_attempts times (that is, if the first attempt fails, then there will be max_attempts - 1 retries). Must be >= -1. If unspecified when the queue is created, Cloud Tasks will pick the default. -1 indicates unlimited attempts. This field has the same meaning as task_retry_limit in queue.yaml/xml. Note: Cloud Tasks stops retrying only when max_attempts and max_retry_duration are both satisfied. When the task has been attempted max_attempts times and when the max_retry_duration time has passed, no further attempts are made, and the task is deleted. If you want your task to retry infinitely, you must set max_attempts to -1 and max_retry_duration to 0.

Implementation

core.int? maxAttempts;