Help documentation

Clean up after canceling a task

When you have jobs that take a long time to run, it is very useful to have the capability to cancel it when you already know it will fail. By default, Cruise will allow the task to finish executing so that the agent does not get into an inconsistent state. Alternatively, you can have the agent execute any task you want when the job is canceled. This allows you to stop the process and clean up anything that is left over.

Example usage

Usage: As a developer, I want to stop running my Twist tests and clean up the environment on each job when I cancel the stage.

  • On the Administration Tab, edit the jobs that should handle canceling correctly
  • Ensure the following "task" block is in the job configuration
  • Now, whenever you cancel the stage while the jobs are running the ant "twist" target, the target "kill_twist" will execute