A supplier counts two bags of house blend. Your dashboard still shows eight. Both systems agree the shop should reorder at five. Tomorrow morning, someone needs to see two bags on hand and one product to reorder, even if the supplier sends the file twice.
Open the stock dashboard and run the sample sync twice. The button starts with eight bags in an isolated copy of the inventory. It runs the same code as the nightly job against a two-product supplier feed. Check the result against the source feed.
What runs at 06:00 UTC?
One floo app runs a web service and a scheduled command from the same image. The command reads the supplier snapshot and updates Postgres. The web service reads those rows. The dashboard shows when the last sync finished, even after the web service restarts.
The supplier sends absolute quantities and a revision number. On the first run, revision 2 replaces revision 1 for both products. Only house blend falls below its reorder point. On the second run the revisions match, so zero rows change. The job commits the inventory changes and its completion timestamp together. A failed transaction leaves the previous snapshot in place.
If your feed sends individual sales instead of stock counts, use a unique sale ID per event. Subtracting the same sale twice would give the wrong answer.
Run it with your own app
Download the runnable example. Its README walks through deploying a copy and triggering the job twice. The hosted demonstration uses a bundled fictional feed and a public dashboard. For business inventory, set the app to App sign-in and replace the sample feed with your supplier export. How floo schedules jobs