1

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?

  • You can view Scheduled Jobs in Setup->Jobs->Scheduled jobs. Try comparing production Scheduled Jobs with Sandbox. If they are same there could be some data setup issue. Try setting debug logs just near next run time of a job for submitted by user. Debug logs will provide exact info why jobs are not performing what they are expected to perform. – Mukesh Verma Jul 14 '16 at 5:21
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.