Cancellation batch job not working for proccesing jobs


#1

I have a batch job including many jobs in it. When I cancel the batch job delete enqueued jobs but proccessing. Is it possible kill the proccesing jobs?


#2

Your jobs need to be checking the cancellation token that’s passed in when they start to see if the job has been cancelled. You need to do this inside of loops, most especially. It’s overhead to keep checking but it’s the only way to gracefully cancel something that’s already running.