Quartz cron-expression Demo

Source: Internet
Author: User

1. Start every day 0:5 and start every 15 minutes, 23:50 stop:

0 5/15 0-23 * * *
The cron expression, since 5, is executed every 15 minutes, and the last execution time at 23 is exactly 23:50. That means we're going to start at 23:50.
2. 8:00~20:00, triggered every two hours:
0 0 8-20/2 * * *?

Cron expressions, which start at 8 o'clock, are triggered every 2 hours. That is, 8,10,12,14,16,18,20.

3.8:00~20:00, triggered once every half hour:

0 0/30 8-20 * * *?

Cron expression, which starts 8 o'clock and fires once every half hour.

Quartz cron-expression Demo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.