问题
I have Scheduler use do run every 2 minutes. but i can't use to 2m30s
.Please help me
SchedulingPattern pattern = new SchedulingPattern("*/2 * * * *");
回答1:
You can wait 30 seconds after the SchedulingPattern's start.
Scheduler scheduler = new Scheduler();
scheduler.schedule("*/2 * * * *", new Runnable() {
@Override
public void run() {
Thread.sleep(30*1000);
foo();
}
};);
schedule.start();
来源:https://stackoverflow.com/questions/19855830/schedulingpattern-con4j-every-2-minutes-30-second-or-150-seconds