---
title: Creating a recurring task and task chain
description: Use dsconfig to create one or more tasks and then add them to a task chain for scheduling.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_create_recurring_task_chain
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_create_recurring_task_chain.html
revdate: September 13, 2023
section_ids:
  steps: Steps
  example: Example:
  example-2: Example:
---

# Creating a recurring task and task chain

Use `dsconfig` to create one or more tasks and then add them to a task chain for scheduling.

## Steps

1. To create a task, use `dsconfig create-recurring-task`.

   ### Example:

   The following creates a backup task.

   ```shell
   $ bin/dsconfig create-recurring-task \
     --task-name backup-1 \
     --type backup \
     --set 'email-on-failure:admin1@company.com' \
     --set 'email-on-failure:admin2@company.com' \
     --set compress:true \
     --set encrypt:true \
     --set "retain-previous-full-backup-age:4 w" \
     --set retain-previous-full-backup-count:10
   ```

2. To create a task chain to schedule and run recurring tasks, use `dsconfig create-recurring-task-chain`.

   ### Example:

   ```shell
   $ bin/dsconfig create-recurring-task-chain \
     --chain-name "backup chain" \
     --set recurring-task:backup-1 \
     --set scheduled-date-selection-type:selected-days-of-the-month \
     --set scheduled-day-of-the-month:last-day-of-the-month \
     --set scheduled-time-of-day:02:00
   ```
