---
title: "Adds or updates a recurrence rule for a task."
method: POST
path: "/tasks/{taskId}/setrecurrency"
tags: ["tasks"]
---

# Adds or updates a recurrence rule for a task.

`POST /tasks/{taskId}/setrecurrency`

<Check title="Required Permissions" icon="key">Any authenticated user.</Check>

## Path parameters

- `taskId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- TaskRecurrencyForm
  - `recurrencyRule` string, required — The recurrence rule as cron expression. We support all expressions which cronos supports (https://github.com/HangfireIO/Cronos). The number of occurrences is limited to 24 a day.
  - `recurrencyInterval` integer, nullable — The interval of the executed expression. If the value is 3, only the third time of the expression the recurrence is actually executed.
  - `relativeDueOn` integer, nullable — The relative due date and time of the task created from this recurrence rule, in seconds, from the moment of creating the task by a recurrence rule.
  - `recurrencyStartOn` string, date-time, nullable — DateTime when recurring task creation will start, considering the set Recurrency Rule and Recurrency Interval.
  - `recurrencyTimezone` string, nullable — The timezone of the Recurrency Rule. If not set, will use the requesting user's timezone.

## Response `204`

No Content

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
