---
name: "Run durable Go agent schedules with gocron"
slug: "run-durable-go-agent-schedules-with-gocron"
description: "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."
github_stars: 7079
verification: "security_reviewed"
source: "https://github.com/go-co-op/gocron"
author: "go-co-op"
publisher_type: "open_source"
category: "Templates & Workflows"
framework: "Custom Agents"
tool_ecosystem:
  github_repo: "go-co-op/gocron"
  github_stars: 7079
---

# 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.

## 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/go-co-op/gocron
- 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

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/run-durable-go-agent-schedules-with-gocron/)
