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:
- Make sure you have completed the CLI installation.
- Activate the environment the job is running by using the
bx envcommand. - Cancel the job by using the
bx cancelcommand.