Core Expression

https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm

A Cron Expressions

Cron expressions are used to configure instances of CronTrigger, a subclass of org.quartz.Trigger. A cron expression is a string consisting of six or seven subexpressions (fields) that describe individual details of the schedule.

These fields, separated by white space, can contain any of the allowed values with various combinations of the allowed characters for that field. Table A-1 shows the fields in the expected order.

Table A-1 Cron Expressions Allowed Fields and Values

Name Required Allowed Values Allowed Special Characters

Seconds


Y


0-59


, - * /


Minutes


Y


0-59


, - * /


Hours


Y


0-23


, - * /


Day of month


Y


1-31


, - * ? / L W C


Month


Y


0-11 or JAN-DEC


, - * /


Day of week


Y


1-7 or SUN-SAT


, - * ? / L C #


Year


N


empty or 1970-2099


, - * /

Example A-1 Cron Expressions

Cron expressions can be as simple as * * * * ? * or as complex as 0 0/5 14,18,3-39,52 ? JAN,MAR,SEP MON-FRI 2002-2010.

Here are some more examples:

Expression Means
0 0 12 * * ? Fire at 12:00 PM (noon) every day
0 15 10 ? * * Fire at 10:15 AM every day
0 15 10 * * ? Fire at 10:15 AM every day
0 15 10 * * ? * Fire at 10:15 AM every day
0 15 10 * * ? 2005 Fire at 10:15 AM every day during the year 2005
0 * 14 * * ? Fire every minute starting at 2:00 PM and ending at 2:59 PM, every day
0 0/5 14 * * ? Fire every 5 minutes starting at 2:00 PM and ending at 2:55 PM, every day
0 0/5 14,18 * * ? Fire every 5 minutes starting at 2:00 PM and ending at 2:55 PM, AND fire every 5 minutes starting at 6:00 PM and ending at 6:55 PM, every day
0 0-5 14 * * ? Fire every minute starting at 2:00 PM and ending at 2:05 PM, every day
0 10,44 14 ? 3 WED Fire at 2:10 PM and at 2:44 PM every Wednesday in the month of March
0 15 10 ? * MON-FRI Fire at 10:15 AM every Monday, Tuesday, Wednesday, Thursday and Friday
0 15 10 15 * ? Fire at 10:15 AM on the 15th day of every month
0 15 10 L * ? Fire at 10:15 AM on the last day of every month
0 15 10 ? * 6L Fire at 10:15 AM on the last Friday of every month
0 15 10 ? * 6L Fire at 10:15 AM on the last Friday of every month
0 15 10 ? * 6L 2002-2005 Fire at 10:15 AM on every last friday of every month during the years 2002, 2003, 2004, and 2005
0 15 10 ? * 6#3 Fire at 10:15 AM on the third Friday of every month
0 0 12 1/5 * ? Fire at 12 PM (noon) every 5 days every month, starting on the first day of the month
0 11 11 11 11 ? Fire every November 11 at 11:11 AM
时间: 2024-10-14 16:39:14

Core Expression的相关文章

eclipse core expression usage

http://codeandme.blogspot.com/2012/04/expression-examples.html We need to set checkEnabled on the visibleWhen element to false, otherwise the expression will not be active. The withsection uses activePartId as source. It is a string containing the ID

freemarker.core.InvalidReferenceException: Expression stackObject.value.get(propertyName).toString() is undefined

很奇怪的报错, 在实体中添加 toString方法后, 想在前台列表中使用 <s:debug标签调试, 发现报错如下: freemarker.core.InvalidReferenceException: Expression stackObject.value.get(propertyName).toString() is undefined on line 58, column 122 in template/simple/debug.ftl.    at freemarker.core.T

JAVA对象转化JSON出现死循环问题

主要是解决JSON因Hibernate映射生成的集合的转化出现的死循环问题. 这个方法很重要 1 public String ajaxJsonByObjectDirecdt(Object obj, String[] filterNames){ 2 JsonConfig jsonConfig = new JsonConfig(); 3 jsonConfig.setIgnoreDefaultExcludes(false); 4 jsonConfig.setCycleDetectionStrategy

freemarker报错之九

1.错误描述 五月 30, 2014 11:52:04 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Can't convert the date to string, because it is not known which parts of the date variable are in use. Use ?date, ?time or ?datetime bu

freemarker报错之七

1.错误描述 五月 30, 2014 11:33:57 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Expected hash. flag evaluated instead to freemarker.template.TemplateBooleanModel$2 on line 21, column 8 in type.ftl." Expected ha

struts2jsp里&lt;struts:head theme:&quot;ajax&quot;&gt;报错

按java web王者归来做strut2练习使用<struts:head theme:"ajax">报错 org.apache.jasper.JasperException: Template /template/ajax/head.ftl not found 加入struts2-dojo-plugin-2.1.6包 并在jsp里引入<%@ taglib prefix="sx" uri="/struts-dojo-tags"%&

freemarker报错之六

1.错误描述 <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>freemarker基本数据类型</title> </head> <body> 张三丰 123,456 Error on line 20, column 8 in type.ftl Expect

freemarker报错之十二

1.错误描述 六月 04, 2014 10:31:47 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Expected number, sequence, or string. maps evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 11, column 12 in map.f

freemarker报错之四

1.错误描述 五月 28, 2014 9:56:48 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Expression student.course is undefined on line 15, column 24 in course.ftl." Expression student.course is undefined on line 15, col