Skip to main content

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.

Monitoring site detail with Hold to Check Out All button 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.

  1. Open /monitoring/[siteId] for the site you're closing.
  2. 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.
  3. Hold the button for ~1 second. (Tapping briefly does nothing — this is intentional, to prevent accidents.)
  4. The system checks out every worker, visitor, and staff member currently on site with checkout_method = 'foreman'.
  5. 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.

  1. Every day at 18:00 Sydney time, a Cloudflare Worker pings the CSIM API.
  2. The API runs auto_checkout_all(), which checks out every open check-in across every active site with checkout_method = 'auto'.
  3. 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:

  1. 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.
  2. 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?

  1. Resilience. If you forget, the system catches it. The site doesn't carry overnight check-ins into the next day's headcount.
  2. 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