Job cancellation logic