Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/penglq/tasktimer

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/penglq/tasktimer

  • v0.0.0-20210209040420-24f696f955e6
  • Source
  • Go
  • Socket score

Version published
Created
Source

taskTimer

cron 表达式代表一个时间的集合,使用 6 个空格分隔的字段表示:

字段名 是否必须 允许的值 允许的特定字符 秒 (Seconds) 是 0-59 * / , - 分 (Minute) 是 0-59 * / , - 时 (Hours) 是 0-23 * / , - 日 (Day of month) 是 1-31 * / , - ? 月 (Month) 是 1-12 或 JAN-DEC * / , - 星期 (Day of week) 否 0-6 或 SUM-SAT * / , - ?

/* 
   ------------------------------------------------------------
   第64位标记任意 , 用于 日/周 , 日 / 月 的相互干扰。
- 0 为 表示区间 [63 , 0] 的 每一个点。
   ------------------------------------------------------------ 

   假设区间是 0 - 63 , 则有如下的例子 : 

   比如  0/3 的表示如下 : (表示每隔两位为1)
   * / ?       
   +---+--------------------------------------------------------+
   | 0 | 1 0 0 1 0 0 1  ~~  ~~                    1 0 0 1 0 0 1 |
   +---+--------------------------------------------------------+   
~ ~                                           ~~ 0 

   比如  2-5 的表示如下 : (表示从右往左2-5位上都是1)
   * / ?       
   +---+--------------------------------------------------------+
   | 0 | 0 0 0 0 ~  ~      ~~            ~    0 0 0 1 1 1 1 0 0 |
   +---+--------------------------------------------------------+   
~ ~                                           ~~ 0 

  比如  * 的表示如下 : (表示所有位置上都为1)
   * / ?       
   +---+--------------------------------------------------------+
   | 1 | 1 1 1 1 1 ~  ~                  ~    1 1 1 1 1 1 1 1 1 |
   +---+--------------------------------------------------------+   
~ ~                                           ~~ 0 
*/

thanks

  • https://hacpai.com/article/1534497226108
  • https://github.com/robfig/cron

FAQs

Package last updated on 09 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc