Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Setup & productivity

Salesforce Cron Builder

Build a Salesforce-flavor (Quartz) cron expression with presets, then preview the next 5 fire times.

Cron fields

Presets

Expression + next 5 fires

Expression appears here.

Next 5 fires (browser time)

Fix the expression to preview fires.

Related dictionary terms

§

About this tool

Salesforce Scheduled Apex uses the Quartz cron format, which is similar to standard Unix cron but with a leading seconds field and slightly different day-of-week semantics. Getting this string right by hand is fiddly. This builder lets you pick a preset (every hour / every weekday at 9am / first of every month) or fill in each field, and previews the next 5 fire times so you can sanity-check before scheduling.

How it works

Each cron field - seconds, minutes, hours, day-of-month, month, day-of-week, year - has its own input with help text. The builder validates each value against the Quartz spec, assembles the expression, and runs a forward iterator over the next 30 days to produce the next 5 fire times in your local timezone. Use the "copy" button next to the result to paste straight into a `System.schedule()` call or the Setup UI.

When to use it
  • Scheduling a nightly job to run at 02:00 GMT regardless of when you click "Schedule" in the UI.
  • Building a "first business day of the month" expression for invoicing or billing jobs.
  • Diffing two cron strings side-by-side to confirm they fire at the same time.
§

Frequently asked questions

How is Salesforce cron different from Unix cron?
Two main differences: Salesforce/Quartz uses a leading seconds field (so 7 fields total), and day-of-month and day-of-week are mutually exclusive - exactly one must be `?`.
Why are the fire times in my local timezone?
For sanity checking. Salesforce evaluates the expression in the org's timezone (Setup → Company Information). The output makes the offset explicit so you can adjust if needed.
How many scheduled jobs can an org run?
100 active scheduled Apex jobs per org as a hard limit. Use a single dispatcher class that checks current time and routes to the right batch when you hit it.