Are Scheduled Jobs copied after Sandbox Refresh? I did a refresh of a full copy sandbox and looked at the scheduled jobs but not all of them are there. Anyone has any ideas of the criteria used to copy scheduled jobs?
They should all be there. I had to open a ticket with Salesforce recently because a glitch during a full copy sandbox refresh meant that it was refreshed without all of the Scheduled Jobs listed on that page.
If you are trying to schedule a job and you receive an error message which states it has already been scheduled, try querying for
CronJobDetail objects to see if there are any that have no
CronTrigger objects associated with them. If there are any, you will have to submit a ticket to Salesforce to have one of their techs go and clear it out.
There are two Standard objects which records are required for Scheduled Jobs to be displayed on UI.
One standard object is "
CronTrigger". Another is "
CronTrigger records are copied upon sandbox refresh while
AsyncApexJob are not copied.
So the solution is to copy them manually or reschedule on sandbox.
In the past I developed a package to copy scheduled jobs. Later I abandoned that project.