Don't you really dislike when you go to deploy some code to a production Salesforce org and it fails because you forgot to unschedule a batch class? This is especially frustrating in a larger org where there is lots of code running and the deployment takes a long time due to the large number of @isTest methods that need to be run. I thought I would share some code that I wrote, which will remove any scheduled batch jobs and, therefore, avoid any issues with deployments in your orgs. Besides, who doesn't want to see more examples of @isTest Apex methods?
Short post but I thought this would be useful to those of you that use batch Apex in your Salesforce orgs.
Author
Greg Hacic
I've been working with Salesforce since 2003. Over the years, I've held various roles for a diverse array of salesforce.com customers, created a Salesforce specific ISV, and built numerous applications for the AppExchange. All of these experiences have allowed me to learn quite a bit about building on the platform.