0

I am developing java application and in this I wanted to run some method periodically. I have used java schedule to run that method periodically. This is my Cron Expression.

/* runs in twelth second by every 5 minutes*/   
public static String CRON_TIME = "12 0/5 * * * ?";

This works fine. Now I wanted to stop running this scheduler for one hour per day. How I can write Cron Expression to do it? Give me a idea.

4

1 回答 1

0

如果您想在 01:00 和 02:00 之间排除,请使用:

"12 0/5 0,2-23 * * ?"
于 2012-08-13T05:01:59.550 回答