[SalesForce] Hourly limit exceeded for processing workflow time triggers

I think I received this message because too many time-dependent workflows were scheduled.

I did a research and what I can find is :

https://help.salesforce.com/apex/HTViewHelpDoc?id=workflow_time_action_considerations.htm&language=en

Salesforce limits the number of time triggers an organization can
execute per hour. If an organization exceeds the limits for its
Edition, Salesforce defers the execution of the additional time
triggers to the next hour. For example, if an Unlimited Edition
organization has 1,200 time triggers scheduled to execute between 4:00
PM and 5:00 PM, Salesforce processes 1,000 time triggers between 4:00
PM and 5:00 PM and the remaining 200 time triggers between 5:00 PM and
6:00 PM.

My questions is if an Unlimited Edition instance has 3,000 time triggers scheduled to execute between 4:00 PM and 5:00 PM,

Would Salesforce process my 3000 time triggers from

4:00 PM to 5:00 PM first 1000

5:00 PM to 6:00 PM second 1000

6:00 PM to 7:00 PM third 1000

Or would Salesforce only defer the second 1000 and erase everything after.

Best Answer

Salesforce does not throw the triggers away if it goes over the hourly limit it just queues it up for the next hour.

So in your example of 3,000 workflow time triggers firing at once. Which seems super crazy to have that high a volume but I digress...

It would flow something like this:

  1. Salesforce checks to see if there are any time triggers that are scheduled to fire now. It does this back end check every 15 minutes or so. That's why a time trigger action does not necessarily fire instantly from a time trigger it's all queued and a process checks the queue so it could be up to 15 minutes.
  2. Salesforce finds 3,000 actions that need to be processed.
  3. Salesforce processes the actions till it hits the limit. In your case 1,000.
  4. I believe that the limit is rolling so that if you execute 300 actions then 500 actions 20 minutes later and then 700 actions 40 minutes later. The first 300 actions drop out of the limit and you're now at 1200/1000.
    1. (well sort of it'd be more like fire 300 you're at 300/1000, then fire 500 so you're at 800/1000, then finding 700 need to be fired it would look and see you're at 800 so it would do 200 to get you at 1000/1000. time will pass to have the 300 drop off so you're at 700/1000)
  5. So now we've waited till we are under the limit again, be it one hour after 1000 actions happened or that we've rolled off of a bunch of actions spread out over time.
  6. Salesforce's back end job spools through the queue to find actions that are ready to be fired.
  7. Slaesforce finds there are 2,000 records to be processed.
  8. The process repeats till there are no more records to be processed.

Make sense?