Cron表达式
in developCo-De with 0 comment

Cron表达式

in developCo-De with 0 comment

Online Generator

Format

7位

* * * * * * *
1st: Second
2nd: Minutes
3rd: Hours
4th: Day of Month 1-31
5th: Month
6th: Day of Week 1-7
7th: Year

6位

* * * * * *
1st: Second
2nd: Minutes
3rd: Hours
4th: Day of Month 1-31
5th: Month
6th: Day of Week 1-7

5位

* * * * *
1st: Minutes
2nd: Hours
3rd: Day of Month 1-31
4th: Month
5th: Day of Week 1-7

Presents

All Field

* : every signle one, eg, every mins, every day
- : range, eg, 10:00am to 11:59am, Minutes 10 to 11
, : and, eg, 10:00am and 13:00
/ : step increase, eg, every 5 minute

Day of Month / Day of Week

? : any one, only use in <Day of Month> or <Day of Week>
L : last Day of Month in <Day of Month>
xL : last x(Mon-Sun,1-7) in <Day of Week>
xW : <Day of Month>, nearest weekday of the X in month, 5W, nearest weekday of 5 of the month
n#m :  <Day of Week>, the n(1-7) day of the mth week, 3#2, the second wednesday of the month

Quick one

0 3 ? * 6    // 每周六凌晨3点
0 1 * * *    // 每天凌晨1点
5 * * * *    // 每个小时的5分的时候
*/5 * * * *  // 每5分钟
0 1 L * *    // 每个月最后一天的凌晨1点

52b958042b786935ef64fdf1c6fb7211.jpeg

Comments are closed.