I ran into an issue the other day while trying to deploy to an org with a lot of ongoing activity. I ran into the annoying error message:
Error: Apex class has Batchable or Future jobs pending or in progress
(line 1, column 21)
I checked the Apex Jobs queue and found that there was over 5500 queued jobs. Some which had been waiting for hours. I decided to clear the queue so that I could continue with the deployment. I wrote a quick APEX script to mass abort all the queued jobs which I then executed using anonymous APEX.