periodic

command
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

Periodic jobs

Run a PeriodicJob every second (foreman.Every); the leader enqueues each tick once and the example stops after three runs.

docker compose -f deploy/docker-compose.yml up -d --wait postgres  # Postgres on localhost:55432
go run ./examples/periodic                                         # safe to rerun

Default FOREMAN_DATABASE_URL: postgres://foreman:foreman@localhost:55432/foreman?sslmode=disable.

Expected output

periodic job ran (1)
periodic job ran (2)
periodic job ran (3)

Documentation

Overview

Command periodic enqueues a job every second through the leader.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL