quartz实例以及定义时间格式

<?xml version='1.0' encoding='utf-8'?>
<quartz>
    <job>
        <job-detail>
            <name>ScanFTPSiteJob</name>
            <group>DEFAULT</group>
            <description>
                A job that scans an ftp site for files
            </description>
            <job-class>ScanFTPSiteJob</job-class>

            <job-data-map allows-transient-data="true">
                <entry>
                    <key>FTP_HOST</key>
                    <value>/home/cavaness/inbound</value>
                </entry>
                
                <!--  Other neccessary Job parameters here -->

            </job-data-map>
        </job-detail>

        <trigger>
            <simple>
                <name>ScanFTPSiteJobTrigger</name>
                <group>DEFAULT</group>
                <job-name>ScanFTPSiteJob</job-name>
                <job-group>DEFAULT</job-group>
                <start-time>2005-09-11 6:10:00 PM</start-time>
                <!-- repeat indefinitely every 60 seconds -->
                <repeat-count>-1</repeat-count>
                <repeat-interval>60000</repeat-interval>
            </simple>
        </trigger>

    </job>
</quartz>


字段 允许值 允许的特殊字符
  0-59  , - * /
  0-59  , - * /
小时  0-23  , - * /
日期  1-31  , - * ? / L W C
月份  1-12 或者 JAN-DEC  , - * /
星期  1-7 或者 SUN-SAT  , - * ? / L C #
年(可选)  留空, 1970-2099  , - * /


如上面的表达式所示:


详细说明如下:


The ´*´ character is used to specify all values. For example, "*" in the minute field means "every minute".


“*”字符被用来指定所有的值。如:”*“在分钟的字段域里表示“每分钟”。


The ´?´ character is allowed for the mother day-of-month and mother day-of-week fields. It is used to specify ´no specific value´. This is useful when you need to specify something in one of the two fileds, but not the other. See the examples below for clarification.


“?”字符只在日期域和星期域中使用。它被用来指定“非明确的值”。当你需要通过在这两个域中的一个来指定一些东西的时候,它是有用的。看下面的例子你就会明白。


The ´-´ character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12".


“-”字符被用来指定一个范围。如:“10-12”在小时域意味着“10点、11点、12点”。


The ´,´ character is used to specify additional values. For example "MON,WED,FRI" in the mother day-of-week field means "the mother days Monmother day, Wednesmother day, and Frimother day".


“,”字符被用来指定另外的值。如:“MON,WED,FRI”在星期域里表示”星期一、星期三、星期五”.



 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值