I have this quartz cron expression: exp = "0 * * ? * *" that runs every minute. I use this expression as a trigger to call a HTTP POST method every minute. The problem is that it calls the post method multiple times. I need an expression that will execute one time in a minute. Any suggestion how to do that?
Asked
Active
Viewed 1.2k times
4 Answers
13
This works with Quartz.
Every 1 minute, exactly at the start of a minute - 0 0/1 * * * ?

Anil Konduru
- 878
- 10
- 18
3
How about a simple schedule trigger instead?
trigger = newTrigger()
.withIdentity("trigger7", "group1")
.withSchedule(simpleSchedule()
.withIntervalInMinutes(1) )
.build();
Source : Quartz tutorial-lesson-05 / Build a trigger that will fire now, then repeat every five minutes

Alex Ar
- 76
- 3
-1
use this expression :
"* * * * *"
i.e 5 asteriks
try using that.
use this link for reference :
https://crontab.guru/every-1-minute

dangi13
- 1,275
- 1
- 8
- 11
-
It doesen't work. The expression is not valid. The expression should be a quartz one. – Eraldo Forgoli Aug 17 '18 at 11:40