Automatically archive tasks according to a user-defined policy

Deploy keeps all active tasks in the Monitoring section, which is located under the search bar at the top left of the screen.

Executed tasks are archived when you manually click Close or Cancel on the task. You can define a custom task archive policy that will automatically archive tasks that are visible in Monitoring.

About task states

Before configuring a custom task archive policy, ensure that you are familiar with the Deploy task states.

Automatically archive active tasks

To automatically archive active tasks according to a policy:

  1. From the side bar, click Configuration
  2. Click Menu button, then select New > Policy > policy.TaskArchivePolicy.
  3. In the Name field, enter a unique policy name.
  4. In the Days to retain tasks field, enter the number of days that Deploy should retain tasks. If 0 days is specified, all active tasks are subject to archiving.


  • The TaskyArchivePolicy can only be setup by an administrator user.
  • By default, successfully-executed active tasks and failed tasks are archived. This can be changed from the Common section by toggling the Include executed tasks and Include failed tasks options.
  • A policy will attempt to archive any tasks that are in one of the following passive states: EXECUTED, STOPPED, FAILED, or ABORTED. Specifically, the policy will attempt to:

    • Complete the EXECUTED tasks, transitioning them to the DONE state.
    • Cancel any STOPPED, FAILED, and ABORTED tasks, transitioning them to the CANCELLED state.
  • Canceling will trigger any alwaysExecuted phases, so some tasks may re-run as the cleanup phase of a plan is executed in which staged files are removed, and deployeds are registered.
  • By default, automatic policy execution is enabled and will run according to the crontab schedule defined in the Schedule section. Optionally, you can change the crontab schedule or disable policy execution.
  • You can manually execute a task archive policy by right-clicking it and selecting Execute job now. To test the policy by running it without removing tasks: from the Schedule section, select Dry run policy.