Master control
If your scheduling needs are more complex, you need to be ultra-specific; you might not be able to easily use the Schedule Apex page. Let's say you need a process to run once a quarter or just once a year. Instead of trying to hack together some creative schedule, you can just use a CronTrigger. A CronTrigger represents a scheduled job and is similar to a cron job on UNIX systems. CronTriggers can be set with a very specific expression through the System.schedule() method. You can specify the schedule by seconds, minutes, hours, day of month, month, day of week, and year. There are options for using a range, intervals, and all possible numbers. Basically, if you can think of a schedule, you should be able to write a CronTrigger ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access