Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cron expression to run after 30 minutes past hour [closed]

I would like to schedule a job using Quartz to run 30 minutes past the hour. For example I want the job to run at 00:30, 1:30, 2:30 and so on.

Can you guys help me to get the correct cron expression?

like image 283
Sirish Avatar asked Dec 30 '25 17:12

Sirish


1 Answers

Simple enough

30 * * * *

Every 30th minute of every hour, every day of the month, every month, every day of the week. From wikipedia

# *    *    *    *    *  [command to execute]
# ┬    ┬    ┬    ┬    ┬
# │    │    │    │    │
# │    │    │    │    │
# │    │    │    │    └───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
# │    │    │    └────────── month (1 - 12)
# │    │    └─────────────── day of month (1 - 31)
# │    └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)

For quartz, the cron expression introduces more fields (7 total), the first being seconds and the last being years (but optional). You can see those here.

You need

* 30 * * * * [*]
like image 122
Sotirios Delimanolis Avatar answered Jan 01 '26 07:01

Sotirios Delimanolis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!