Ecosyste.ms: Repos
An open API service providing repository metadata for many open source software ecosystems.
Package Usage: go: github.com/fumiama/cron
Package cron implements a cron spec parser and job runner.
To download the specific tagged release, run:
Import it in your program as:
It requires Go 1.11 or later due to usage of Go Modules.
Callers may register Funcs to be invoked on a given schedule. Cron will run
them in their own goroutines.
A cron expression represents a set of times, using 5 space-separated fields.
Month and Day-of-week field values are case insensitive. "SUN", "Sun", and
"sun" are equally accepted.
The specific interpretation of the format is based on the Cron Wikipedia page:
https://en.wikipedia.org/wiki/Cron
Alternative Cron expression formats support other fields like seconds. You can
implement that by creating a custom Parser as follows.
Since adding Seconds is the most common modification to the standard cron spec,
cron provides a builtin function to do that, which is equivalent to the custom
parser you saw earlier, except that its seconds field is REQUIRED:
That emulates Quartz, the most popular alternative Cron schedule format:
http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html
Asterisk ( * )
The asterisk indicates that the cron expression will match for all values of the
field; e.g., using an asterisk in the 5th field (month) would indicate every
month.
Slash ( / )
Slashes are used to describe increments of ranges. For example 3-59/15 in the
1st field (minutes) would indicate the 3rd minute of the hour and every 15
minutes thereafter. The form "*\/..." is equivalent to the form "first-last/...",
that is, an increment over the largest possible range of the field. The form
"N/..." is accepted as meaning "N-MAX/...", that is, starting at N, use the
increment until the end of that specific range. It does not wrap around.
Comma ( , )
Commas are used to separate items of a list. For example, using "MON,WED,FRI" in
the 5th field (day of week) would mean Mondays, Wednesdays and Fridays.
Hyphen ( - )
Hyphens are used to define ranges. For example, 9-17 would indicate every
hour between 9am and 5pm inclusive.
Question mark ( ? )
Question mark may be used instead of '*' for leaving either day-of-month or
day-of-week blank.
'L' stands for "last". When used in the day-of-month field, it specifies
the last day of the month.
You may use one of several pre-defined schedules in place of a cron expression.
You may also schedule a job to execute at fixed intervals, starting at the time it's added
or cron is run. This is supported by formatting the cron spec like this:
where "duration" is a string accepted by time.ParseDuration
(http://golang.org/pkg/time/#ParseDuration).
For example, "@every 1h30m10s" would indicate a schedule that activates after
1 hour, 30 minutes, 10 seconds, and then every interval after that.
Note: The interval does not take the job runtime into account. For example,
if a job takes 3 minutes to run, and it is scheduled to run every 5 minutes,
it will have only 2 minutes of idle time between each run.
By default, all interpretation and scheduling is done in the machine's local
time zone (time.Local). You can specify a different time zone on construction:
Individual cron schedules may also override the time zone they are to be
interpreted in by providing an additional space-separated field at the beginning
of the cron spec, of the form "CRON_TZ=Asia/Tokyo".
For example:
The prefix "TZ=(TIME ZONE)" is also supported for legacy compatibility.
Be aware that jobs scheduled during daylight-savings leap-ahead transitions will
not be run!
A Cron runner may be configured with a chain of job wrappers to add
cross-cutting functionality to all submitted jobs. For example, they may be used
to achieve the following effects:
Install wrappers for all jobs added to a cron using the `cron.WithChain` option:
Install wrappers for individual jobs by explicitly wrapping them:
Since the Cron service runs concurrently with the calling code, some amount of
care must be taken to ensure proper synchronization.
All cron methods are designed to be correctly synchronized as long as the caller
ensures that invocations have a clear happens-before ordering between them.
Cron defines a Logger interface that is a subset of the one defined in
github.com/go-logr/logr. It has two logging levels (Info and Error), and
parameters are key/value pairs. This makes it possible for cron logging to plug
into structured logging systems. An adapter, [Verbose]PrintfLogger, is provided
to wrap the standard library *log.Logger.
For additional insight into Cron operations, verbose logging may be activated
which will record job runs, scheduling decisions, and added or removed jobs.
Activate it with a one-off logger as follows:
Cron entries are stored in an array, sorted by their next activation time. Cron
sleeps until the next job is due to be run.
Upon waking:
4 versions
Latest release: over 2 years ago
83 dependent packages
View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/fumiama/cron
View more repository details: https://repos.ecosyste.ms/hosts/GitHub/repositories/fumiama%2Fcron
Dependent Repos 60
Cha0sIDL/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 28.3 MB - Last synced: 8 months ago - Pushed: 8 months ago
58565856/gocqzbp Fork of FloatTech/gocqzbp
go-cqhttp与ZeroBot-Plugin的合体- v1.3.0 go.mod
Size: 169 KB - Last synced: 19 days ago - Pushed: 9 months ago
FloatTech/ZeroBot-Plugin-Playground
快来这里上传你的奇思妙想吧!- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 688 KB - Last synced: 7 days ago - Pushed: 8 days ago
FloatTech/gocqzbp
go-cqhttp与ZeroBot-Plugin的合体- v1.3.0 go.mod
Size: 169 KB - Last synced: 6 months ago - Pushed: 9 months ago
MoYoez/Lucy-QOnebot
A bot Running with Zerobot.- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 168 KB - Last synced: about 2 hours ago - Pushed: 1 day ago
FloatTech/AnimeAPI
二次元相关API- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 5.09 MB - Last synced: about 16 hours ago - Pushed: about 17 hours ago
tlogn/plugin_random_setu
ZeroBot-Plugin的插件,相关扩展- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 30.5 MB - Last synced: 10 months ago - Pushed: about 2 years ago
FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.sum
- v1.3.0 go.mod
Size: 18.2 MB - Last synced: 29 days ago - Pushed: 30 days ago
Jiang-Red/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 19 MB - Last synced: 6 months ago - Pushed: 6 months ago
fumiama/ReiBot
Lightweight Telegram bot framework- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 495 KB - Last synced: 10 months ago - Pushed: about 1 year ago
SaIGyouKo/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.sum
- v1.3.0 go.mod
Size: 16.6 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
KomeiDiSanXian/BFHelper
一款集成战绩查询和服务器管理的战地机器人插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 452 KB - Last synced: 21 days ago - Pushed: 21 days ago
imAkisa/gocqzbp Fork of FloatTech/gocqzbp
go-cqhttp与ZeroBot-Plugin的合体- v1.3.0 go.mod
Size: 161 KB - Last synced: about 1 year ago - Pushed: over 1 year ago
dezhishen/MiraiGo-Bot-Plugins 📦
MiraiGo-Bot插件库- v1.3.0 go.sum
Size: 9.1 MB - Last synced: 25 days ago - Pushed: over 2 years ago
guohuiyuan/midi
自定义的一套文字midi互相转化规则的库- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17.6 KB - Last synced: 10 months ago - Pushed: almost 2 years ago
yuanyan3060/SkadiBot
基于zerobot的明日方舟抽卡bot- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 50.8 MB - Last synced: about 1 year ago - Pushed: over 2 years ago
SeiunnSky233/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17 MB - Last synced: 7 months ago - Pushed: over 1 year ago
shudorcl/ZeroBot-Plugin-Playground Fork of FloatTech/ZeroBot-Plugin-Playground
快来这里上传你的奇思妙想吧!- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 467 KB - Last synced: about 1 year ago - Pushed: about 1 year ago
FloatTech/zbputils
ZeroBot-Plugin 的工具库- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 506 KB - Last synced: 8 days ago - Pushed: 8 days ago
FloatTech/ReiBot-Plugin
基于 ReiBot 的 Telegram 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 514 KB - Last synced: 6 months ago - Pushed: 7 months ago
FloatTech/floatbox
框架无关的 go 工具库- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 80.1 KB - Last synced: 8 days ago - Pushed: 8 days ago
Mu-L/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 18.3 MB - Last synced: about 6 hours ago - Pushed: about 13 hours ago
FloatTech/ZeroBot-Plugin-Dynamic
ZeroBot-Plugin 的模块化,不支持 Windows,需要 CGO- v1.3.0 go.sum
Size: 170 KB - Last synced: 10 months ago - Pushed: about 1 year ago
Suika99/AsoulBot
asoul相关的qq机器人- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 6.85 MB - Last synced: 9 months ago - Pushed: over 1 year ago
FloatTech/nvai-avatar-generator
Use novelai API to generate plugin's avatar- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 26.4 KB - Last synced: about 1 year ago - Pushed: over 1 year ago
FloatTech/rendercard
Draw card image by Golang- v1.3.0 go.sum
Size: 2.32 MB - Last synced: 8 months ago - Pushed: about 1 year ago
yodit10124/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17.5 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
guohuiyuan/maofly-spider
漫画猫下载脚本- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 28.3 KB - Last synced: 9 months ago - Pushed: almost 2 years ago
dezhishen/onebot-plus-plugin 📦
onebot-plus 的插件仓库- v1.3.0 go.sum
Size: 544 MB - Last synced: 25 days ago - Pushed: about 1 year ago
fangliuyu/zbputils Fork of FloatTech/zbputils
ZeroBot-Plugin 的工具库- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 409 KB - Last synced: about 1 year ago - Pushed: about 1 year ago
DataEraserC/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17.9 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
whs102395/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
jqs113/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17.2 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
starim00/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 134 MB - Last synced: 3 days ago - Pushed: 4 days ago
alexskim/ZeroBot-Plugin-Alex Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 81.6 MB - Last synced: 12 months ago - Pushed: about 1 year ago
Jiang-Red/ZeroBot-Plugin-Playground Fork of FloatTech/ZeroBot-Plugin-Playground
快来这里上传你的奇思妙想吧!- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 658 KB - Last synced: 11 months ago - Pushed: 11 months ago
Stardust-minus/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 14.2 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
fangliuyu/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 15.5 MB - Last synced: about 17 hours ago - Pushed: about 18 hours ago
badnor/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 14.2 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
tianling888/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 14.3 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
Coloured-glaze/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 14.7 MB - Last synced: 9 months ago - Pushed: 9 months ago
TsukinoNami/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 14.7 MB - Last synced: 10 months ago - Pushed: 11 months ago
possible318/ZeroBot-Plugin-Playground Fork of FloatTech/ZeroBot-Plugin-Playground
快来这里上传你的奇思妙想吧!- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 461 KB - Last synced: 13 days ago - Pushed: over 1 year ago
possible318/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 17.5 MB - Last synced: 13 days ago - Pushed: over 1 year ago
qiuleyo/gocqzbp Fork of FloatTech/gocqzbp
体- v1.3.0 go.mod
Size: 160 KB - Last synced: about 1 year ago - Pushed: over 1 year ago
Katou-Kouseki/AnimeAPI Fork of FloatTech/AnimeAPI
二次元相关API- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 5.04 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
Haorwen/AnimeAPI Fork of FloatTech/AnimeAPI
二次元相关API- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 5.04 MB - Last synced: 10 months ago - Pushed: 11 months ago
BA7JCM/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 18.2 MB - Last synced: 27 days ago - Pushed: 29 days ago
tang-bai/ZeroBot-Plugin-dve Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 15 MB - Last synced: 29 days ago - Pushed: 29 days ago
shudorcl/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 27.4 MB - Last synced: 8 days ago - Pushed: 8 days ago
sbsony/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 14.9 MB - Last synced: 4 months ago - Pushed: 4 months ago
weigui404/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 18.7 MB - Last synced: about 7 hours ago - Pushed: about 8 hours ago
DDGG123/ZeroBot-Plugin Fork of FloatTech/ZeroBot-Plugin
基于 ZeroBot 的 OneBot 插件- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 18 MB - Last synced: 9 months ago - Pushed: 9 months ago
Kittengarten/KittenCore
基于 ZeroBot 开发的 QQ 群机器人程序- v1.3.0 go.mod
- v1.3.0 go.sum
Size: 4.73 MB - Last synced: 8 months ago - Pushed: 9 months ago