推荐一个比crontab更好用的东西:crongo

简介: This is a crontab service that supports hot plug and high performance. In addition, it supports second level (first parameters), multi time point and time section function. 这是一个支持热插拨、高性能的crontab服务,另外,它还支持秒级别(第1个参数)、多时间点、时间段功能。
This is a crontab service that supports hot plug and high performance. In addition, it supports second level (first parameters), multi time point and time section function.


这是一个支持热插拨、高性能的crontab服务,另外,它还支持秒级别(第1个参数)、多时间点、时间段功能。

特色:    
  基于golang的通用、基础工具,代码简单易维护。

用法:
// six columns mean:
//       second:0-59
//       minute:0-59
//       hour:1-23
//       day:1-31
//       month:1-12
//       week:0-6(0 means Sunday)

// SetCron some signals:
//       *: any time
//       ,:  separate signal
//      -:duration
//       /n : do as n times of time duration
/////////////////////////////////////////////////////////
//    0/30 * * * * *                        every 30s
//    0 43 21 * * *                         21:43
//    0 15 05 * * *                        05:15
//    0 0 17 * * *                          17:00
//    0 0 17 * * 1                           17:00 in every Monday
//    0 0,10 17 * * 0,2,3                   17:00 and 17:10 in every Sunday, Tuesday and Wednesday
//    0 0-10 17 1 * *                       17:00 to 17:10 in 1 min duration each time on the first day of month
//    0 0 0 1,15 * 1                        0:00 on the 1st day and 15th day of month
//    0 42 4 1 * *                         4:42 on the 1st day of month
//    0 0 21 * * 1-6                       21:00 from Monday to Saturday
//    0 0,10,20,30,40,50 * * * *            every 10 min duration
//    0 */10 * * * *                     every 10 min duration
//    0 * 1 * * *                       1:00 to 1:59 in 1 min duration each time
//    0 0 1 * * *                       1:00
//    0 0 */1 * * *                      0 min of hour in 1 hour duration
//    0 0 * * * *                       0 min of hour in 1 hour duration

 

github: https://github.com/sinacms/crongo

谋胆并重
目录
相关文章
|
2月前
|
监控 Ubuntu Linux
|
Linux Shell Python
crontab定时执行python脚本不成功解决方案
crontab定时执行python脚本不成功解决方案
|
Linux 开发工具 Windows
如何使用crontab 定期执行脚本?
持续创作,加速成长!这是我参与「掘金日新计划 · 6 月更文挑战」的第11天,点击查看活动详情 大家好,我是阿萨。最近用到了一个Linux命令crontab。用它来定时运行linux的任务。这个有点类似windows里的定时任务。今天主要记录下我用到的它的用法。
131 0
|
开发工具
crontab 基础用法
crontab 基础用法
|
Linux Python
linux下定时任务利器之crontab
大家一定会遇到linux下定时去执行某个脚本,或者启动柜某个服务,或者执行我们的python脚本等,这篇文章告诉你怎么操作。 crontab 命令满足你 因为我这里想每晚定时执行我本地的脚本去跑自动化,不需要人工去执行 ,直接定时任务即可 。。。。请大家多多补充,共同进步。。
943 1
linux下定时任务利器之crontab
|
JavaScript 前端开发 Unix
管理 crontab 的开源工具
要开始使用 cron,你可以简单地在命令行输入 crontab -e,启动一个打开了当前 crontab(“cron table” 的缩写)文件的编辑器(如果你以 root 身份这样做,你访问的是系统 crontab)。
289 0
管理 crontab 的开源工具