Run durable Go agent schedules with gocron
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.
npx skills add agentskillexchange/skills --skill run-durable-go-agent-schedules-with-gocron
gocron is a Go scheduling library for running functions at predetermined times. Use it when a Go-based agent, MCP server, worker, or operator needs in-process recurring work without depending on system cron: polling queues, refreshing embeddings, rotating reports, checking external state, or launching bounded maintenance tasks.
What this skill actually does
The repeatable workflow is: add github.com/go-co-op/gocron/v2 to the Go service, create a scheduler, register duration, cron, daily, weekly, monthly, or one-time jobs, wrap agent work in typed tasks, apply singleton or scheduler-wide concurrency limits, start the scheduler with the service lifecycle, and shut it down cleanly with context-aware teardown.
Invoke this instead of using system cron when the schedule belongs inside a Go agent process and needs application state, retry policy, concurrency control, leader election, or graceful shutdown. The scope boundary is embedded scheduling for Go agent services. It is not a generic cron concept, hosted scheduler product, or broad Go framework listing.