[SalesForce] Scheduled jobs are not running in sandbox after Refresh

We have certain scheduled jobs in production which runs batch classes and they are scheduled to run every day.

Now when I refreshed a fullcopy sandbox, I don't see any log of these batch classes running. I checked it in 'Apex Jobs'. But under production apex jobs I see correct entries.

Scheduled Jobs section in sandbox show correct values under 'Started' and 'Next Scheduled Run' details. But no log in apex job for these batch classes.

So is it like scheduled jobs are not getting triggered at all?
Is it a known issue or I have to enable something after refresh?

Best Answer

This is a known Issue in salesforce.You have to manually schedule jobs in sandbox after refresh.Please find the link to known issue below:

AsyncApexJob row for Scheudled Apex Jobs is not sandbox copied

Summary
Scheduled Apex Jobs not working correctly in refreshed Sandbox

Repro

  1. Apex Scheduler (job) is scheduled on Production env.
  2. Refresh Sandbox.
  3. Activate Sandbox.
  4. On the nextfiretime:
    • Scheduled Apex Job Id:<08e...> can execute on Production env.
    • Scheduled Apex Job Id:<08e.>. cannot execute correctly on Sandbox env.
    • The JobID is not outputted in Apex Jobs page which monitor the status of all Apex jobs in Sandbox.

Workaround
Manually schedule the Apex Job after sandbox refresh

Related Topic