Question

I'm trying to import an APEX trigger with a test class. I can't deploy it though because all of my Scheduled APEX tests try to run, and they can't because the jobs they are testing are already scheduled for execution, so the deployment fails.

Is there a way around this without having to delete all the scheduled jobs? Or did I create all the tests classes for the Scheduled jobs wrong?

Was it helpful?

Solution

Jennifer you should consider checking out http://salesforce.stackexchange.com for more specific Salesforce.com questions.

There is unfortunately not a way to deploy a trigger (assuming your going from a Sandbox -> Production org) without switching off the scheduled jobs.

Salesforce unfortunately makes this very difficult. You need to build a scheduler for your jobs that allows you to deactivate them and reactivate them after making this modification to your org if it's causing problems and blocking you from deploying a component.

Either that, or write your triggers in such a way that they can work around the conflicting classes that are being invoked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top