DATABASE_URL within an environment. The job exits after writing one row. Its UTC date is the primary key, so running it twice on the same day updates that row.
Open the daily reorder report.
To deploy your own copy with a coding agent, paste this from an empty project directory:
Build the report
In an empty directory, save these two files. Rungo mod tidy with Go 1.26 to create go.sum.
go.mod
main.go
Deploy the API and schedule
Dockerfile
floo.app.toml
go-reorder- in floo.app.toml. The migration creates both tables and seeds the two example items before the new image receives traffic. The sample endpoint is public and contains only fixture data. For real stock levels, restrict the app to invited staff.
Install the floo CLI, sign in, and run these commands from the example directory:
Run the first report
Open the dev URL printed by the deploy. Before the first job runs, it showsNo report yet. Run the job from the same directory:
SKUs to reorder: 1. Run the job again. The count stays at one. Change the reorder condition or the fixture quantities to test a different stock policy.
For an existing Go service, see the Go deployment guide. Cron jobs covers retries, timeouts, and running a job in prod.