function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravindra PanchaliRavindra Panchali 

Schedule Job waiting in the Queue !!!

Hi All,

I have writtern an apex code which is scheduled to run on daily basis at 6:00 am IST. From the Apex Jobs list page, I can see that my last request was submitted on 16th-Sept-2015 but still (today: 21th-Sept-2015) its present in the Queue to run (Completion date is empty). Not sure why this job is waiting for so long in the Queue and unable to run. Below is the screenshot for the same:

User-added image


Ironically the below scheduled jobs snapshot suggest that the schedule code was started on 21th-Sept-2015 and next scheduled run is on 22th-Sept-2015.

User-added image

Could you please help me out to understand this behavior of Schedule Apex code?

Thanks in advance for your time & help!!!

Cheers,
Lokendra Sharma.
Chris SweetChris Sweet
The "Queued" record on the Apex Jobs page should be there. Scheduled Apex jobs maintain a Queued record in that table. For example, I have records in that table dating way back to early 2014 that are still running nightly jobs. It looks as though yours are running as it has a Started Date on 9/21 at 6AM. You should be able to see records with "Batch Apex" as the Job Type and "Completed" as the Status in your Apex Jobs table.

If you have many things running, it may help to set up a list view (rather than using All) that singles out this specific Apex Class.