Skip to main content

Spring @Scheduled Cron Expression Generator

Spring's @Scheduled annotation uses a six-field cron expression — the key difference from Unix cron is a leading Seconds field. Miss that and a schedule you expect to run hourly will look like it runs every minute.

Build your expression below and copy the ready-to-paste @Scheduled annotation into your Spring bean.

Official Spring documentation →

Expression

Spring cron adds a seconds field as the first position.
Sec
Min
Hour
Day
Month
DOW
0
0
9
*
*
MON-FRI

Tip: press Ctrl+Enter to copy

Presets

Visual Builder

Description

At 09:00 AM, Monday through Friday

Timezone
June 2026
Fires on 22 days
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Spring cron syntax

SecMinHourDayMonthDOW
009**MON-FRI

Spring cron examples

Click any example to load it into the generator above.

Frequently asked questions

Why does Spring cron have six fields?

Spring's cron format adds a Seconds field at the front, so the order is Seconds, Minutes, Hours, Day-of-month, Month, Day-of-week. A standard five-field Unix expression won't parse — prefix it with a seconds value (often 0).

How do I set the timezone for a Spring scheduled task?

Use the zone attribute on the annotation: @Scheduled(cron = "0 0 9 * * MON-FRI", zone = "Europe/Paris"). Without it, Spring uses the server's default timezone.

Can I use macros instead of a full expression?

Yes. Spring supports @yearly, @monthly, @weekly, @daily, and @hourly as shortcuts, which can be clearer than the equivalent six-field expression.