Scenario — End-of-day batch checkout
For: Admin + Foreman
Situation
The work day is over. Workers are leaving site. You want all the open check-ins closed cleanly so tomorrow's headcount starts from zero, and so the Day Log records show accurate check-out times rather than tomorrow's auto-checkout timestamp.
Two ways to handle it
A — Manual: Hold to Check Out All
Use this at the end of every shift.
Screenshot: Monitoring site detail at /monitoring/[siteId]. Sticky action bar at the top. "Hold to Check Out All" button (right-aligned, only appears when at least one person is on site). 8 workers, 1 visitor, 1 staff currently checked in.
- Open
/monitoring/[siteId]for the site you're closing. - In the sticky action bar at the top, find the Hold to Check Out All button. It only appears when at least one person is on site.
- Hold the button for ~1 second. (Tapping briefly does nothing — this is intentional, to prevent accidents.)
- The system checks out every worker, visitor, and staff member currently on site with
checkout_method = 'foreman'. - The three columns empty out. The headcount strip drops to zero.
B — Auto: 6 PM cron
If you forget — or you're just trusting the system — the 6 PM Sydney auto-checkout sweep handles it.
- Every day at 18:00 Sydney time, a Cloudflare Worker pings the CSIM API.
- The API runs
auto_checkout_all(), which checks out every open check-in across every active site withcheckout_method = 'auto'. - The function is idempotent — running it twice in a row is safe.
You don't need to do anything for this to work.
Why prefer manual?
Two reasons:
- Accurate check-out time. Hold-to-check-out-all uses now as the timestamp. Auto-checkout uses 18:00. If your shift actually finished at 16:30, the auto timestamp is inaccurate by 90 minutes — fine for muster but bad for time tracking or audit.
- Visibility into who left. Walking through Hold-to-Check-Out-All forces you to glance at the three columns and notice anyone unexpected. A clean auto sweep can hide errors (e.g. a visitor who never left through the gate).
Why prefer auto?
- Resilience. If you forget, the system catches it. The site doesn't carry overnight check-ins into the next day's headcount.
- No-shows on weekend / public holidays. When nobody is on site to run the manual batch, the cron is the only thing that closes everything.
Both is fine
In practice, most sites use manual at end of shift + auto as fallback. The auto-sweep on a site that's already empty is a no-op.
Picking up workers who slipped through
If you check in tomorrow morning and find someone still showing as on site (a check-in from yesterday that auto-checkout missed for whatever reason), use the per-row × button on Monitoring to check them out manually.
See also
- foreman/lessons/02-running-a-check-in-day — the Monitoring page and the sticky action bar.
- emergency-on-site — emergency case, where you wouldn't use either of these (you'd use the muster instead).