SSH QuartZ cron Expression

Source: Internet
Author: User
Tags time interval ssh

Crontrigger

Crontriggers tend to be more useful than simpletrigger, if you need to base the concept on calendars, rather than simpletrigger a fully specified time interval, recurrence of the launch work schedule.
Crontrigger, you can specify the trigger schedule such as "Every Friday noon", or "every weekday 9:30", or even "every 5 minutes, 9:00 and 10:00 per day, Monday mornings, Wednesday Fridays".
Even so, as with Simpletrigger, Crontrigger owns the starttime specified timesheet when the specified timesheet should stop (optional) end time.

Cron Expressions

A cron expression is used to configure an Crontrigger instance. The cron expression is a string, which is actually a seven subexpression that describes the timeline for individual details. These subexpression are separate whitespace, represented by: Seconds Minutes Hours day-of-month Month day-of-week year (optional field)
Example "0 0 12? * WED "at 12:00 every Wednesday,

Individual subexpression can contain a range, for example, in the previous example ("WED") can be replaced by "Mon-fri", "MON, WED, FRI" or even "Mon-wed,sat".

"*" represents the entire time period.

Each field has a set of valid values that can be specified, such as

Seconds (sec): can be expressed in number 0-59,

Minutes (points): You can use the number 0-59 to indicate that

Hours (Time): You can use the number 0-23 to indicate that

Day-of-month (days): You can use any of the one by one values in the number 1-31, but pay attention to some special months

Month (months): can be used in 0-11 or with strings "The FEB, the MAR, the APR, May, June, AUG, SEP, OCT, NOV and DEC"

Day-of-week (Weekly): Can be indicated by the number 1-7 (1 = Sunday) or by the word Fukou string "SUN, MON, TUE, WED, THU, FRI and SAT"

"/": For a special unit, expressed as "every" such as "0/15" means every 15 minutes, "0" as starting from "0", "3/20" means every 20 minutes, and "3" means starting from 3rd minutes

“?” : Represents a day of the month, or a day of the week

"L": For each month, or weekly, expressed as the last day of the month, or the last week of each month as "6L" means "last Friday of the month"

"W": Represents the most recent weekday, such as "15W" placed on the monthly (day-of-month) field as "the most recent weekday until 15th of this month"

"" # ": is used to specify the nth working day of the month, in which the contents of the" 6#3 "or" fri#3 "in the field per week (Day-of-week) mean" third Friday per month "

1 The format of the cron expression: second-time Time of the year (optional).

           Special characters allowed for field name allowed seconds 0-59  
           ,-*/min 0-59,-*/                               Hour 0-23,-*/day 1-31 , - * ? /L W C month 1-12 or JAN-DEC,-*/weeks 1-7 or Sun-sat,-*? /L C # Year (optional field) empty, 1970-2099,-*/"?" Characters: Indicates an indeterminate value "," character: Specify a value of "-" character: Specify a Range "/" character for a value: Specifies the increment of a value. N/m represents the increment of M "L" characters from N at a time, used in the last day of the month for one months, and the last one weeks in the week to indicate the X "W" character: Specify the most recent weekday from the given date (Monday to Friday) "#" Character: Table Shows the week of the month X.

             6#3 represents the 3rd Friday **2 of the month) cron Expression Example: * * Every 5 seconds: */5 * * * *?

             Performed every 1 minutes: 0 */1 * * *?

    0 0 23 * * For every day at 23 O ' time:         One 1 o'clock in the morning every day: 0 0 1 * *?

             0 0 1 1 * For each month, 1th, 1 o'clock in the morning

             23 on the last day of each month: 0 0 L *? Sunday 1 o'clock in the morning every week: 0 0 1?

             * L in 26, 29, 33 minutes: 0 26,29,33 * * *?
 Every day 0, 13, 18, 21 points are executed once: 0 0 0,13,18,21 * *?

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.