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
Rick_NookIndRick_NookInd 

Scheduled Apex Faster than Once Per Hour?

Could I get confirmation from someone who fully understands the limitations of Scheduled Apex before I consider emailing the product manager some constructive criticism? 

 

Is does not appear to be possible to schedule a single apex job faster than once per hour based on the following error message:

 

System.StringException: Seconds and minutes must be specified as integers: 0 0,15,30,45 * * * ?

and this:

 

from Apex Developers Guide

Seconds 0–59 None
Minutes 0–59 None

Hours 0–23 , - * /

 

I realize there is worry about load on SalesForce servers, but c'mon.  I also realize I could do this with 2 or 4 jobs, but thats a hack and we only get 10 total.

 

The UI is also crippled.  I can't seem to even schedule hourly through it.  Also, it is forcing me to specify an end date when I can't imagine ever wanting a reoccuring job to not just continue until stopped.

tmatthiesentmatthiesen

Rick,

 

Thank you for the feedback.  The scheduling UI only allows customers to schedule once per day.  If customers need a higher frequency, they can schedule via the API - providing up to an hourly frequency.

 

We are looking at increasing this frequency in a later release. 

 

What is your use case for the higher frequency?

 

 

regards,

 

Taggart 

Rick_NookIndRick_NookInd

My current use case is hyper technical involving a workaround, and I'm sure you'd prefer a good business use case.  Allow me to speak in generalities until at the very least API 18 Eclipse is out and I can attempt to reimplement some  things using scheduled Apex.

 

Users in my experience really don't want to be held up more than 15 to 30 minutes.  So if the lack of the Apex running yet is holding anyone up in any way, then an hour isn't quick enough.  Think:  Doctor's Office.

 

That said, now that I'm clear on the limitations thanks to your help, I'll probably just schedule everything that might hold up a user to occur every half hour, which is workable, even if allowing me half as many of those types of scheduled jobs.  Most of my scheduled apex jobs I anticipate to be nightly regardless.

jkucerajkucera

Taggart - another use case I've been asked about is lead reassignment every 15min if not followed up on.  This is important for high volume, quick transaction call centers.