For regular maintenance items that need to be done on the PingDirectory Server, you can create recurring tasks and task chains with the dsconfig create-recurring-task command. These tasks can perform regular backups, LDIF exports, enter and exit lockdown mode, or other static operations. Because this process is owned by the server, tasks do not require special privileges or credentials, and they can be run when the server is offline.

You create tasks and then add them to a recurring task chain for scheduling. The task chain ensures that invocations of a task or set of tasks run in a specified order and do not overlap.

A recurring task includes:

  • The task-specific object classes to include in the task entry.
  • The task-specific attributes to include in the task entry, if any.
  • Whether to alert on task start, success, and/or failure.
  • Any addresses to email on task start, success, and/or failure.
  • Whether to cancel an instance of the task if it is dependent upon another task, and that task does not complete successfully.

After you create a task, add one or more tasks to and schedule them with a task chain using the dsconfig create-recurring-task-chain command.

A recurring task chain includes:

  • An ordered list of the tasks to invoke.
  • The months, days, times, and time zones in which each task can be scheduled to start.
  • The behavior to exhibit if any of the tasks are interrupted by a server shutdown.
  • The behavior to exhibit if the server is offline when the start time occurs.

Changing the schedule for an existing recurring task chain only takes effect the next time that an instance of the chain needs to be scheduled. It does not affect any existing instances of the chain that are already scheduled. That existing instance still runs at the originally scheduled time; when that run is complete, the server schedules the next iteration according to the then-current schedule logic.

Also, you cannot simply cancel the existing instance to get the next instance to run ten minutes earlier. When you cancel an iteration of a recurring task chain, the server automatically schedules the next instance for the earliest time that matches the scheduling criteria that is later than the one that was just canceled. It will never schedule a new instance for earlier than or the same time as one that you manually canceled.