I have a Scheduled Job that doesn't seem to be running, and can't figure out why.
When I go to Monitor > Jobs > Scheduled Jobs, two of my scheduled jobs are the following:
- "Queued SMS Engine" is supposed to run hourly. You can see that it was last run at 2:02 PM and the next run will be at 3:02 PM
- "CCx Client Surveys Engine" is supposed to run daily. You can see that it was last run at 12:00pm today, and will next be run at 12:00pm tomorrow.
… Seems OK so far … In practice, though, we're noticing the results of the SMS Engine running each hour, but the work done by the Client Surveys Engine never actually happens.
Time to check out the Monitor > Jobs > Apex Jobs page. And here's what we see there:
And sure enough, while there's a log entry for the hourly SMS Job, there is no evidence that the Client Surveys job actually happens at the expected time.
Have you see this before? Any idea what I should be looking at or debugging?
What parts of my code would be helpful to look at when debugging this?
Best Answer
I haven't seen that but when I am debugging scheduled batches, I typically schedule it via the dev console to run in 2 minutes time, and then watch the logs - even if if something isn't written to the jobs queue, you should see it in the logs for the running user (which would be you if created via Dev Console)