How to run a scheduled job every 15 minutes?

Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day.

Schedule Job GUI

Answer

Jobs cannot be scheduled in increments smaller than one hour. Please read the documentation to learn about how you can schedule jobs that run in more complex patterns than the GUI allows.

In Apex, you can schedule four jobs to every hour, staggered 15 minutes apart:

System.schedule('Scheduled Job 1', '0 0 * * * ?', new ScheduledClass());
System.schedule('Scheduled Job 2', '0 15 * * * ?', new ScheduledClass());
System.schedule('Scheduled Job 3', '0 30 * * * ?', new ScheduledClass());
System.schedule('Scheduled Job 4', '0 45 * * * ?', new ScheduledClass());

Attribution
Source : Link , Question Author : Christian Deckert , Answer Author :
4 revs, 2 users 86%

Leave a Comment