[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4915":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":17,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},4915,"cron","robfig\u002Fcron","robfig","a cron library for go",null,"Go",14133,1695,195,115,0,1,5,16,75.79,"MIT License",false,"master",true,[],"2026-06-12 04:00:23","[![GoDoc](http:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Frobfig\u002Fcron?status.png)](http:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Frobfig\u002Fcron)\n[![Build Status](https:\u002F\u002Ftravis-ci.org\u002Frobfig\u002Fcron.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002Frobfig\u002Fcron)\n\n# cron\n\nCron V3 has been released!\n\nTo download the specific tagged release, run:\n```bash\ngo get github.com\u002Frobfig\u002Fcron\u002Fv3@v3.0.0\n```\nImport it in your program as:\n```go\nimport \"github.com\u002Frobfig\u002Fcron\u002Fv3\"\n```\nIt requires Go 1.11 or later due to usage of Go Modules.\n\nRefer to the documentation here:\nhttp:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Frobfig\u002Fcron\n\nThe rest of this document describes the the advances in v3 and a list of\nbreaking changes for users that wish to upgrade from an earlier version.\n\n## Upgrading to v3 (June 2019)\n\ncron v3 is a major upgrade to the library that addresses all outstanding bugs,\nfeature requests, and rough edges. It is based on a merge of master which\ncontains various fixes to issues found over the years and the v2 branch which\ncontains some backwards-incompatible features like the ability to remove cron\njobs. In addition, v3 adds support for Go Modules, cleans up rough edges like\nthe timezone support, and fixes a number of bugs.\n\nNew features:\n\n- Support for Go modules. Callers must now import this library as\n  `github.com\u002Frobfig\u002Fcron\u002Fv3`, instead of `gopkg.in\u002F...`\n\n- Fixed bugs:\n  - 0f01e6b parser: fix combining of Dow and Dom (#70)\n  - dbf3220 adjust times when rolling the clock forward to handle non-existent midnight (#157)\n  - eeecf15 spec_test.go: ensure an error is returned on 0 increment (#144)\n  - 70971dc cron.Entries(): update request for snapshot to include a reply channel (#97)\n  - 1cba5e6 cron: fix: removing a job causes the next scheduled job to run too late (#206)\n\n- Standard cron spec parsing by default (first field is \"minute\"), with an easy\n  way to opt into the seconds field (quartz-compatible). Although, note that the\n  year field (optional in Quartz) is not supported.\n\n- Extensible, key\u002Fvalue logging via an interface that complies with\n  the https:\u002F\u002Fgithub.com\u002Fgo-logr\u002Flogr project.\n\n- The new Chain & JobWrapper types allow you to install \"interceptors\" to add\n  cross-cutting behavior like the following:\n  - Recover any panics from jobs\n  - Delay a job's execution if the previous run hasn't completed yet\n  - Skip a job's execution if the previous run hasn't completed yet\n  - Log each job's invocations\n  - Notification when jobs are completed\n\nIt is backwards incompatible with both v1 and v2. These updates are required:\n\n- The v1 branch accepted an optional seconds field at the beginning of the cron\n  spec. This is non-standard and has led to a lot of confusion. The new default\n  parser conforms to the standard as described by [the Cron wikipedia page].\n\n  UPDATING: To retain the old behavior, construct your Cron with a custom\n  parser:\n```go\n\u002F\u002F Seconds field, required\ncron.New(cron.WithSeconds())\n\n\u002F\u002F Seconds field, optional\ncron.New(cron.WithParser(cron.NewParser(\n\tcron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor,\n)))\n```\n- The Cron type now accepts functional options on construction rather than the\n  previous ad-hoc behavior modification mechanisms (setting a field, calling a setter).\n\n  UPDATING: Code that sets Cron.ErrorLogger or calls Cron.SetLocation must be\n  updated to provide those values on construction.\n\n- CRON_TZ is now the recommended way to specify the timezone of a single\n  schedule, which is sanctioned by the specification. The legacy \"TZ=\" prefix\n  will continue to be supported since it is unambiguous and easy to do so.\n\n  UPDATING: No update is required.\n\n- By default, cron will no longer recover panics in jobs that it runs.\n  Recovering can be surprising (see issue #192) and seems to be at odds with\n  typical behavior of libraries. Relatedly, the `cron.WithPanicLogger` option\n  has been removed to accommodate the more general JobWrapper type.\n\n  UPDATING: To opt into panic recovery and configure the panic logger:\n```go\ncron.New(cron.WithChain(\n  cron.Recover(logger),  \u002F\u002F or use cron.DefaultLogger\n))\n```\n- In adding support for https:\u002F\u002Fgithub.com\u002Fgo-logr\u002Flogr, `cron.WithVerboseLogger` was\n  removed, since it is duplicative with the leveled logging.\n\n  UPDATING: Callers should use `WithLogger` and specify a logger that does not\n  discard `Info` logs. For convenience, one is provided that wraps `*log.Logger`:\n```go\ncron.New(\n  cron.WithLogger(cron.VerbosePrintfLogger(logger)))\n```\n\n### Background - Cron spec format\n\nThere are two cron spec formats in common usage:\n\n- The \"standard\" cron format, described on [the Cron wikipedia page] and used by\n  the cron Linux system utility.\n\n- The cron format used by [the Quartz Scheduler], commonly used for scheduled\n  jobs in Java software\n\n[the Cron wikipedia page]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCron\n[the Quartz Scheduler]: http:\u002F\u002Fwww.quartz-scheduler.org\u002Fdocumentation\u002Fquartz-2.3.0\u002Ftutorials\u002Ftutorial-lesson-06.html\n\nThe original version of this package included an optional \"seconds\" field, which\nmade it incompatible with both of these formats. Now, the \"standard\" format is\nthe default format accepted, and the Quartz format is opt-in.\n","robfig\u002Fcron 是一个用于 Go 语言的定时任务调度库。它支持标准的 cron 表达式解析，并且可以通过自定义解析器来兼容带有秒字段的表达式。该库提供了强大的功能，如移除已计划的任务、基于链和作业包装器实现的拦截器机制，这些机制可以用来添加跨切面的行为，例如捕获作业中的 panic、延迟或跳过尚未完成的前一个运行的作业执行等。此外，它还支持可扩展的日志记录以及与 go-logr\u002Flogr 兼容的日志接口。此项目非常适合需要在 Go 应用程序中集成定时任务调度功能的场景，尤其是那些要求高灵活性和可维护性的应用。",2,"2026-06-11 03:01:28","top_language"]