In a previous post, I talked about how to log in to Salesforce with CasperJs. At the time I did not have a good example of what to do next with it. Well, this week I had a need that is something that other people can relate to.
Casper Script
If you’ve ever done any Scheduled Apex work, then you know that if there are scheduled jobs for the class and you do a deployment, the deployment fails. To help negate this with automated installs I wrote the following CasperJs script does the following:
Logs into Salesforce
Navigates to the scheduled jobs page
Gathers all the delete links for the jobs
Deletes them
Then we can run it like all other CasperJs scripts