Automatically archive tasks according to a user-defined policy
XL 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.
Before configuring a custom task archive policy, ensure that you are familiar with the XL Deploy task states.
To automatically archive active tasks according to a policy:
- From the side bar, click Configuration
- Click , then select New > Policy >
- In the Name field, enter a unique policy name.
- In the Days to retain tasks field, enter the number of days that XL Deploy should retain tasks. If 0 days is specified, all active tasks are subject to archiving.
- 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:
ABORTED. Specifically, the policy will attempt to:
- Complete the
EXECUTEDtasks, transitioning them to the
- Cancel any
ABORTEDtasks, transitioning them to the
- Complete the
- Canceling will trigger any
alwaysExecutedphases, 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.