command
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Oct 25, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
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
¶
Command periodic enqueues a job every second through the leader.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.