zoukankan      html  css  js  c++  java
  • Linux Crontab语法

    Crontab语法

    • Lists 链表值 : 逗号,表示并列,要依次序;Examples:"1,2,5,9", "0-4,8-12".
    • Ranges of numbers 区间值 : 连字符-, 'a-b'表示[a, b]区间的每个整值.
    • Asterisk * 遍历值 : *或者*/1表示基本单位步长区间值"first through last"., 即
      • minute用*表示没分钟
      • hour用*表示每小时
      • day用* 表示每日
      • month用* 表示每月
      • dow用* 表示每周的这一天.
    • Step values /n 步长值 /n
      • Conjunction with ranges与区间值复合使用 : */n, n表示间隔长度. Example, "0-23/2" can be used in the hours field to specify command execution every other hour.
      • Steps are also permitted after an asterisk. 步长值与遍历值结合使用. Example so if you want to say "every two hours", you can use "*/2".
    • Names 缩写值 : MonthWeek can also be used for the "month" and "day of week" fields.
      • Use the first three letters of the particular day or month (case doesn't matter). 单词3首字母, 不分大小写.
      • Ranges or lists of names are not allowed.不能使用区间值链表值.
    • 组合使用: -优先级高于/, 如a-b/c(day)每隔c天的ab之间执行操作.
    1. <minute> <hour> <day> <month> <dow> <command>
    2. 第1列 第2列 3 4 5 6
    3. 第1列: 分钟1~59 每分钟用`*`或者` */1`表示
    4. 第2列: 小时1~23(0表示0点)
    5. 第3列: 日期1~31
    6. 第4列: 月份1~12
    7. 第5列: 星期0~6(0表示星期天)
    8. 第6列: 要运行的命令
  • 相关阅读:
    转 : jmeter分布式测试的坑
    Node.js 事件循环
    ubuntu 16.04 安装nodejs
    java中native的用法
    分布式与集群的概念区别
    IntegerToBinaryString
    Mysql InnoDB事务
    浅析Mysql InnoDB存储引擎事务原理
    Mysql数据库事务的隔离级别和锁的实现原理分析
    MySQL中MyISAM和InnoDB的区别
  • 原文地址:https://www.cnblogs.com/xiangwengao/p/4624265.html
Copyright © 2011-2022 走看看