Skip to main content

Cancelling a job

Jobs in the states SUBMITTED, DOWNLOADING_INPUT, RUNNING and UPLOADING_OUTPUT can be cancelled at any time.

Right after the cancellation is requested the job enters in a CANCELLING state, and BatchX sends a SIGTERM signal to its container. The container now has 30 seconds to handle this signal and gracefully terminate before BatchX forcibly terminates it with a SIGKILL signal.

Once the cancellation has completed, the job enters a definitive CANCELLED state.

info

Tip: Make your images handleSIGTERMsignals in order to reduce computational costs.

In order to cancel a job using the CLI:

  1. Make sure you have completed the CLI installation.
  2. Activate the environment the job is running by using thebx env command.
  3. Cancel the job by using the bx cancel command.