periodic

command
v0.1.0 Latest Latest
Warning

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

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

README

Periodic jobs

Registers a PeriodicJob that ticks every second (foreman.Every). The leader enqueues each tick exactly once; the example stops after three runs.

Run

docker compose -f deploy/docker-compose.yml up -d --wait postgres
go run ./examples/periodic

The example connects to FOREMAN_DATABASE_URL (default postgres://foreman:foreman@localhost:55432/foreman?sslmode=disable) and recreates its own schema on every run.

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 and stops after three ticks.

Jump to

Keyboard shortcuts

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