Crate grapeTimerR[][src]

Expand description

made-with-Rust Open Source Love svg2

简介 Intro

A coarse-grained time scheduler can help you create time tasks quickly and simply through some series.



功能 Feature

  • 纯异步的代码执行(Pure async code)
  • 通过命令格式创建std::chrono::Datetime(Created by date format)
  • 简洁的Api格式,轻度且可拆分的函数库(Simple Api, light and detachable library)
  • 快速创建调度器(Quickly create a scheduler)
  • 可控的调度器时间粒度[需要提前指定](Controllable scheduler time granularity [Need to specify in advance])
  • 多线程调度模式(Multi-thread scheduling mode)
  • 时间周期,次数多模式可控[支持每天、每周、每月](Time period, multi-mode controllable number of times [support daily, weekly, monthly])
  • 可以获取下一次执行时间[Chrono Datetime](Can get the string of the next execution time)
  • 自定义起始TimerId的种子(Customize the seed of the starting TimerId)
  • 自定义TimerId的生成函数[自生成ID请注意并发场景下的线程争抢](Custom TimerId generation trait [Self-generated ID, please pay attention to thread contention in concurrent scenarios])
  • TimerId扩展为i64,支持大ID和timestampId生成器(TimerId is i64, supporting large Id and timestampId generator correspondence)

日期格式 Date Format

The scheduler has a light date pattern analysis system, which can provide daily, weekly, and monthly time and date generation methods


关键字 Key格式 Format说明 Description
DayDay 00:00:00生成每日的日期时间
WeekWeek 1 00:00:00生成每周的日期时间, 0~6 分别代表周日到周六
MonthMonth 1 00:00:00生成每月该日期的时间,建议不要使用28日之后的日期
DayDay 00:00:00Generate daily date and time
WeekWeek 1 00:00:00Generate weekly date and time, 0~6 represent Sunday to Saturday
MonthMonth 1 00:00:00The time when the date of the month was generated, it is recommended not to use the date after the 28th