ToolBento
← All guides

ToolBento guide

How to build a cron expression for scheduled jobs

Create a five-field cron schedule from plain inputs so scripts, backups, reports, and recurring jobs run at the time you expect.

Cron looks cryptic until you split it up

A cron expression is just five schedule fields written in a fixed order: minute, hour, day of month, month, and day of week. The hard part is remembering which number belongs where. Splitting the schedule into fields makes it much easier to say, for example, run at minute 0, during hour 9, on every day, in every month, Monday through Friday.

Start from the schedule, not the syntax

Before typing symbols, write the job in normal language. A database backup might need to run every night at 2:00. A sales report might run at 9:00 on weekdays. A cleanup script might run on the first day of each month. Once the human schedule is clear, turning it into cron fields is mostly filling in blanks.

What to enter in ToolBento

Open ToolBento's Cron Expression Builder and choose a Preset schedule if one is close: Every hour, Every day at 9:00, Weekdays at 9:00, Every Monday at 9:00, or First day of each month. For a custom schedule, fill in Minute, Hour, Day of month, Month, and Day of week. The fields accept plain cron values such as *, single numbers, comma lists, and ranges like 1-5.

Use Generate cron expression

After the fields match the schedule you want, press Generate cron expression. The result shows the cron expression, a short schedule summary, the field order, and a tip about using * for every value, commas for lists, and ranges for spans. Copy the expression into your crontab, CI scheduler, hosting dashboard, or job runner only after the summary reads the way you intended.

Check the weekday and hour carefully

Many mistakes come from weekday numbering and 24-hour time. In the builder, an hour of 9 means 9 a.m. and an hour of 21 means 9 p.m. A weekday value of 1-5 means Monday through Friday in the schedule summary. If your target platform documents a different weekday convention or timezone, follow that platform's rules when you paste the final expression.

Examples you can adapt

For a weekday report at 9:00, use minute 0, hour 9, day of month *, month *, and day of week 1-5. For an hourly job, use minute 0 and hour *. For a first-of-month task, use minute 0, hour 9, day of month 1, month *, and day of week *. Presets are a quick way to load these common patterns before making small edits.

Test scheduled jobs before relying on them

A cron expression only decides when a command should run; it does not prove the command works. After adding the schedule, run the job manually once, check logs after the first scheduled run, and confirm the timezone used by the system. For important work such as billing, backups, or customer emails, add monitoring so a missed run is visible instead of silent.