使用 gocron 运行持久化的 Go 代理调度任务
Embed gocron in Go-based agents or operators to run recurring tasks, cron expressions, one-time jobs, singleton executions, concurrency limits, and distributed leader-elected schedules.
Prerequisites
Go 1.x project using github.com/go-co-op/gocron/v2
Installation
Basic usage or getting-started notes:
- gocron is a job scheduling package which lets you run Go functions at pre-determined intervals.
- go get github.com/go-co-op/gocron/v2
- golang
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/go-co-op/gocron/HEAD/README.md
Documentation
- https://pkg.go.dev/github.com/go-co-op/gocron/v2