{"id":1624,"date":"2026-09-10T15:00:00","date_gmt":"2026-09-10T09:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/"},"modified":"2026-09-10T15:00:00","modified_gmt":"2026-09-10T09:30:00","slug":"scheduled-apex-cron-expressions","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/","title":{"rendered":"Scheduled Apex and Cron Expressions Explained Simply"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Scheduled Apex runs an Apex class automatically at times you choose, such as every night at 2 AM or every Monday at 8:30. Nobody needs to click a button. It is how most nightly batch jobs, weekly reports and monthly clean-ups start in Salesforce.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you will learn the Schedulable interface, how to schedule a job from code or Setup, how to read and write cron expressions, and the rules for callouts and limits. It builds on <a href=\"https:\/\/swapnilzambare.com\/blog\/batch-apex-start-execute-finish\/\">Batch Apex<\/a>, <a href=\"https:\/\/swapnilzambare.com\/blog\/queueable-apex-chaining-finalizers\/\">Queueable Apex<\/a> and <a href=\"https:\/\/swapnilzambare.com\/blog\/asynchronous-apex-overview\/\">Asynchronous Apex<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Scheduled Apex?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Scheduled Apex is a class that implements the Schedulable interface and its execute method. You register it with a name and a timetable, and Salesforce calls execute at each scheduled time. The job runs as the user who scheduled it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of an alarm clock. You set it once for 6 AM on weekdays, and it rings every morning without you touching it again. A cron expression is the alarm setting, and the Schedulable class is what happens when it rings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Scheduled Apex Matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Many business tasks follow the calendar, not a user&#8217;s click. Here is why Scheduled Apex matters at Bright Path Tutors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, the fee increase batch must run every night at 2 AM.<\/li>\n\n<li>Also, tutors need a reminder list every weekday at 8:30.<\/li>\n\n<li>Next, old enrolments must be archived on the first day of each month.<\/li>\n\n<li>Scheduled jobs run even when nobody is logged in.<\/li>\n\n<li>Finally, times and frequency stay in one place, easy to change.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So scheduled jobs turn repeating chores into reliable automation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Scheduled Apex Works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Scheduled Apex follows a simple flow. First, you write a class that implements Schedulable. Next, you call System.schedule with a job name, a cron expression and an instance of the class. Then Salesforce stores the schedule as a CronTrigger record and returns its Id. After that, at each matching time, Salesforce queues the job and calls execute when resources are free. Finally, execute does the work, often by starting a Batch or Queueable job.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-1-1024x640.png\" alt=\"Scheduled Apex diagram showing Schedulable class, System.schedule, CronTrigger, time match, execute and start work\" class=\"wp-image-1622\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-1-768x480.png 768w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-1-1536x960.png 1536w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-1-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">How a scheduled job starts at the set time.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">The Schedulable Interface<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A Schedulable class implements one method, <code>execute(SchedulableContext sc)<\/code>. Keep it short. Usually it just starts a batch or a Queueable job.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">System.schedule<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">System.schedule(jobName, cronExpression, job) creates the schedule. The job name must be unique in the org.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cron Expressions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A Salesforce cron expression has six or seven parts: seconds, minutes, hours, day of month, month, day of week and an optional year. Use ? in either day of month or day of week, because you cannot set both.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scheduling from Setup<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Admins can also schedule a class from Setup &gt; Apex Classes &gt; Schedule Apex. This screen supports weekly or monthly runs at a preferred hour, but not every pattern a cron expression allows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Callouts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Scheduled Apex cannot make synchronous callouts in execute. So start a Queueable or batch job with Database.AllowsCallouts, or call a @future(callout=true) method.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Limits<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An org can have up to 100 scheduled Apex jobs at once, or 5 in Developer Edition. Jobs may start a little late when the server is busy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cron Expression Examples<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below shows common schedules.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Cron expression<\/th><th>Runs<\/th><\/tr><\/thead><tbody><tr><td>0 0 2 * * ?<\/td><td>Every day at 2:00 AM<\/td><\/tr><tr><td>0 30 8 ? * MON-FRI<\/td><td>Weekdays at 8:30 AM<\/td><\/tr><tr><td>0 0 9 1 * ?<\/td><td>First day of each month at 9:00 AM<\/td><\/tr><tr><td>0 0 18 ? * 6L<\/td><td>Last Friday of each month at 6:00 PM<\/td><\/tr><tr><td>0 0 0,12 * * ?<\/td><td>Every day at midnight and noon<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">System.schedule vs the Setup Screen<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below compares the two ways to schedule a class.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>System.schedule in code<\/th><th>Setup &gt; Schedule Apex<\/th><\/tr><\/thead><tbody><tr><td>Frequency options<\/td><td>Any cron pattern<\/td><td>Weekly or monthly<\/td><\/tr><tr><td>Exact minute<\/td><td>Yes<\/td><td>Preferred hour only<\/td><\/tr><tr><td>Repeatable in deployments<\/td><td>Yes, with a script<\/td><td>Manual clicks<\/td><\/tr><tr><td>Who uses it<\/td><td>Developers<\/td><td>Admins<\/td><\/tr><tr><td>Best for<\/td><td>Precise or complex schedules<\/td><td>Simple daily or weekly runs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When to use which depends on precision. Use System.schedule for exact times and complex patterns. Use the Setup screen for simple runs that admins manage.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-2-1024x640.png\" alt=\"Scheduled Apex diagram comparing System.schedule and the Setup screen\" class=\"wp-image-1623\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-2-768x480.png 768w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-2-1536x960.png 1536w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-diagram-2-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">System.schedule vs the Setup screen.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">A Real Scheduled Apex Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s use Scheduled Apex at Bright Path Tutors to start the fee increase batch every night at 2 AM.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: The Schedulable Class<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class NightlyFeeScheduler implements Schedulable {\n\n    public void execute(SchedulableContext sc) {\n        \/\/ Keep execute light: just start the batch job\n        Database.executeBatch(new CourseFeeIncreaseBatch(), 200);\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The class does one thing: it starts CourseFeeIncreaseBatch from the Batch Apex post. So the heavy work runs in chunks with fresh limits, not inside the scheduler.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Schedule It<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>String cron = '0 0 2 * * ?';   \/\/ every day at 2:00 AM\nId cronId = System.schedule('Nightly Fee Increase', cron, new NightlyFeeScheduler());\nSystem.debug('Scheduled job: ' + cronId);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run this once in anonymous Apex. The cron expression means second 0, minute 0, hour 2, any day of the month, any month, no specific day of the week.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Check the Schedule<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT Id, CronJobDetail.Name, CronExpression, NextFireTime, State\nFROM CronTrigger\nWHERE CronJobDetail.Name = 'Nightly Fee Increase'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what the query returns after scheduling.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CronExpression: 0 0 2 * * ?   NextFireTime: 2026-09-11 02:00:00   State: WAITING<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also see the job in Setup &gt; Scheduled Jobs, where you can delete it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Stop the Job<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>System.abortJob(cronId);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">System.abortJob removes the schedule, so the job stops running. Use it before deleting or heavily changing the class.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scheduled Apex and Deployments<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, you cannot deploy changes to a class that has active scheduled jobs. So either abort the jobs first and reschedule after, or turn on the deployment setting that allows changes while Apex jobs are pending.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Scheduled Apex<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Putting heavy logic directly in execute instead of starting a batch.<\/li>\n\n<li>Making synchronous callouts from execute.<\/li>\n\n<li>Setting both day of month and day of week instead of using ?.<\/li>\n\n<li>Forgetting the 100 job limit, or 5 in Developer Edition.<\/li>\n\n<li>Expecting the job to start at the exact second.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Scheduled Apex<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Keep execute short and start Batch or Queueable jobs from it.<\/li>\n\n<li>Give every job a clear, unique name.<\/li>\n\n<li>Store cron expressions in custom metadata so admins can change them.<\/li>\n\n<li>Check Setup &gt; Scheduled Jobs after each deployment.<\/li>\n\n<li>Use System.scheduleBatch for one-time delayed batch runs.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Schedule a job that runs a tutor reminder class every weekday at 8:30 AM. Hint: use the cron expression 0 30 8 ? * MON-FRI and a unique job name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Interview Questions on Scheduled Apex<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Scheduling questions are common in practical interviews. Here are the 21 questions asked most about Scheduled Apex.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Questions on Scheduled Apex<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: What is Scheduled Apex?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An Apex class that implements Schedulable and runs at set times.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: Which method must a Schedulable class implement?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">execute(SchedulableContext sc).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: How do you schedule a class in code?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Call System.schedule with a job name, a cron expression and an instance of the class.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: What does System.schedule return?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Id of the CronTrigger record.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: How do you schedule a class without code?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use Setup &gt; Apex Classes &gt; Schedule Apex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: Where can you see scheduled jobs?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Setup &gt; Scheduled Jobs, or by querying CronTrigger.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: How many scheduled Apex jobs can an org have?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Up to 100 at once, or 5 in Developer Edition.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code and Scenario Questions on Scheduled Apex<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: What are the parts of a Salesforce cron expression?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Seconds, minutes, hours, day of month, month, day of week and an optional year.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: Why use ? in a cron expression?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You must leave either day of month or day of week unspecified, and ? does that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: What cron runs every day at 2 AM?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">0 0 2 * * ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: Can Scheduled Apex make callouts?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Not synchronously in execute. Start an async job that allows callouts instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: How do you stop a scheduled job?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Call System.abortJob with the job Id, or delete it in Setup &gt; Scheduled Jobs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: How do you run a batch once after a delay?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use System.scheduleBatch with the number of minutes to wait.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: Which user does a scheduled job run as?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The user who scheduled it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Questions on Scheduled Apex<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: Why keep execute light?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So the scheduler only starts work, while Batch or Queueable handles limits and volume.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: Why can&#8217;t you deploy a class with active scheduled jobs?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce protects running schedules, unless you enable deployments with pending Apex jobs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: How do you test Scheduled Apex?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Call System.schedule between startTest and stopTest, check CronTrigger, then assert the results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: Does a scheduled job run at the exact second?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No. It is queued at that time and runs when resources are free.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: What does 6L mean in day of week?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last Friday of the month, because 6 means Friday.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: How can admins change the schedule without code?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Store the cron expression in custom metadata and reschedule with a small script or setup action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: When should you use a scheduled flow instead?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the logic is simple and admins should own it without Apex.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_scheduler.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Apex Scheduler (Apex Developer Guide)<\/a><\/li>\n\n<li><a href=\"https:\/\/trailhead.salesforce.com\/content\/learn\/modules\/asynchronous_apex\/async_apex_scheduled\" target=\"_blank\" rel=\"noopener noreferrer\">Schedule Jobs Using the Apex Scheduler (Trailhead)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Scheduled Apex runs a Schedulable class at set times.<\/li>\n\n<li>System.schedule takes a job name, a cron expression and the job.<\/li>\n\n<li>Cron expressions use seconds, minutes, hours, day, month and weekday.<\/li>\n\n<li>Keep execute light and start Batch or Queueable work from it.<\/li>\n\n<li>An org can have up to 100 scheduled Apex jobs.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Not every job runs on a clock. Some react to events. Next, read our guide to <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-platform-events-apex\/\">Salesforce Platform Events in Apex<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scheduled Apex runs an Apex class automatically at times you choose, such as every night at 2 AM or every Monday at 8:30. Nobody&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1621,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[8,96],"tags":[98,112,26,91,7,97],"swapz_series":[],"class_list":["post-1624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-salesforce","category-salesforce-developer","tag-apex","tag-async-apex","tag-intermediate","tag-interview-questions","tag-salesforce","tag-salesforce-developer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Scheduled Apex and Cron Expressions Explained<\/title>\n<meta name=\"description\" content=\"Scheduled Apex explained simply: the Schedulable interface, System.schedule, cron expressions, scheduling batches, limits, monitoring and 21 interview Q&amp;A.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scheduled Apex and Cron Expressions Explained\" \/>\n<meta property=\"og:description\" content=\"Scheduled Apex explained simply: the Schedulable interface, System.schedule, cron expressions, scheduling batches, limits, monitoring and 21 interview Q&amp;A.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-10T09:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/922ac0131aaa7088c78c2cb1700e0c9a\"},\"headline\":\"Scheduled Apex and Cron Expressions Explained Simply\",\"datePublished\":\"2026-09-10T09:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/\"},\"wordCount\":1486,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/scheduled-apex-cron-expressions-featured.png\",\"keywords\":[\"Apex\",\"Async Apex\",\"Intermediate\",\"Interview Questions\",\"Salesforce\",\"Salesforce Developer\"],\"articleSection\":[\"Salesforce\",\"Salesforce Developer\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/\",\"name\":\"Scheduled Apex and Cron Expressions Explained\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/scheduled-apex-cron-expressions-featured.png\",\"datePublished\":\"2026-09-10T09:30:00+00:00\",\"description\":\"Scheduled Apex explained simply: the Schedulable interface, System.schedule, cron expressions, scheduling batches, limits, monitoring and 21 interview Q&A.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/scheduled-apex-cron-expressions-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/scheduled-apex-cron-expressions-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Scheduled Apex featured image: title card with an Apex code example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/scheduled-apex-cron-expressions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scheduled Apex and Cron Expressions Explained Simply\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/922ac0131aaa7088c78c2cb1700e0c9a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Scheduled Apex and Cron Expressions Explained","description":"Scheduled Apex explained simply: the Schedulable interface, System.schedule, cron expressions, scheduling batches, limits, monitoring and 21 interview Q&A.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/","og_locale":"en_US","og_type":"article","og_title":"Scheduled Apex and Cron Expressions Explained","og_description":"Scheduled Apex explained simply: the Schedulable interface, System.schedule, cron expressions, scheduling batches, limits, monitoring and 21 interview Q&A.","og_url":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-09-10T09:30:00+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/922ac0131aaa7088c78c2cb1700e0c9a"},"headline":"Scheduled Apex and Cron Expressions Explained Simply","datePublished":"2026-09-10T09:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/"},"wordCount":1486,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-featured.png","keywords":["Apex","Async Apex","Intermediate","Interview Questions","Salesforce","Salesforce Developer"],"articleSection":["Salesforce","Salesforce Developer"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/","url":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/","name":"Scheduled Apex and Cron Expressions Explained","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-featured.png","datePublished":"2026-09-10T09:30:00+00:00","description":"Scheduled Apex explained simply: the Schedulable interface, System.schedule, cron expressions, scheduling batches, limits, monitoring and 21 interview Q&A.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/scheduled-apex-cron-expressions-featured.png","width":2400,"height":1260,"caption":"Scheduled Apex featured image: title card with an Apex code example"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/scheduled-apex-cron-expressions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Scheduled Apex and Cron Expressions Explained Simply"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/922ac0131aaa7088c78c2cb1700e0c9a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=1624"}],"version-history":[{"count":0,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1624\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/1621"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=1624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=1624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=1624"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=1624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}