Skill Detail

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.

Templates & WorkflowsCustom Agents
Templates & Workflows Custom Agents Security Reviewed
โญ 7.1k GitHub stars
INSTALL WITH ANY AGENT
npx skills add agentskillexchange/skills --skill run-durable-go-agent-schedules-with-gocron Copy
Works best when you want a reusable capability, not another fragile one-off prompt.
At a glance
Tools required
Go 1.x project using github.com/go-co-op/gocron/v2
Install & setup
go get github.com/go-co-op/gocron/v2
Author
Go Co Op
Publisher
Open Source
Last updated
Jun 24, 2026
Quick brief

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.

How it works

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.