Scheduled jobs stop executing
Last updated 2014-09-22 ·Reference W-2177119 ·Reported By 3 users
In Winter '14 a small subset of customers noticed that their Apex scheduled jobs stopped working after a few iterations.
If debug logs are enabled for the user who scheduled the job and are captured at the time of the job being fired, almost no logs will be captured. If logs are displayed, then this bug is not at play. Sample logs displayed when bug occurs:
Number of SOQL queries: 0 out of 100
Number of query rows: 0 out of 50000
Number of SOSL queries: 0 out of 20
Number of DML statements: 0 out of 150
Number of DML rows: 0 out of 10000
Number of code statements: 0 out of 200000
Maximum CPU time: 0 out of 10000
Maximum heap size: 0 out of 6000000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Number of fields describes: 0 out of 100
Number of record type describes: 0 out of 100
Number of child relationships describes: 0 out of 100
Number of picklist describes: 0 out of 100
Number of future calls: 0 out of 10
Notice no line of code is getting executed (pay attention to the cumulative limits).
Please notice this bug does not cover the case wherein a Batch Apex job that should be invoked from a scheduled Apex class does not complete or gets executed due to reasons like the following ones:
a) Batch Apex class is not invoked due to conditional logic in scheduled Apex class. Debug logs should show whether or not the Batch Apex class is invoked
b) Query in start() method times out and batch job does not start. Debug logs should show if this is the case.
c) Logic in a specific invocation of execute() times out
1) Schedule a Schedulable Apex class through UI
2) Enable debug logs for your user so that when the job is invoked the logs are captured
3) Wait for class to be executed and monitor execution in Apex Jobs page
4) If almost no logs (see Summary section for sample debug logs) are displayed when job is invoked, the bug is at play.
a) Abort and re-schedule the Schedulable Apex class
b) Use scheduling logic to schedule the class and on completion of the Batch Apex class, abort the previous scheduled job, and schedule it in the future.
Update 30th May 2014: R&D said W-2155645 was a duplicate of W-2177119.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.