Time-off consumption
Moves time-off periods from “planned” to “used” when their start date arrives, and deducts the corresponding amount from the employee’s balance.
How it works
The consumption job runs daily and processes any planned period whose start date is on or before the run date:
- Identifies due periods — looks for employees whose next planned absence has started
- Emits a consumption event — the same event updates the time-off projection, the balance projection, and the related timesheet entries
- Splits long periods — when a planned period spans more than one approval period (e.g. a vacation crossing two months on monthly approval), only the chunk inside the current period is consumed. The remainder stays in the planned list and is consumed when its own chunk becomes due
Each consumed period is removed from Planned and appears under Used on the employee’s time-off page.
When it runs
The job runs automatically and only triggers on workspaces that have at least one planned period due. Manually triggering it on a quiet workspace returns a “skipped” result.
Parameters
This job has no parameters. The only knob you have is the run date, which acts as “today” for the purpose of identifying due periods.
Job results
| Metric | Description |
|---|---|
periods_consumed | Number of planned periods that were converted to used |
consumption_errs | Number of periods that failed to consume (logged with details) |
Special cases
- Accountless periods (an activity-only absence, e.g. a parental day registered against an activity rather than a balance) emit a zero-amount consumption event. Nothing is deducted, but the period still moves to the used bucket
- Back-dated absences are handled by the request handler at the moment the request is approved, not by this job — so the consumption job is mainly a safety net plus the trigger for today-starting periods
Troubleshooting
| Issue | Solution |
|---|---|
| Period still appears as planned the day after it started | Check that the job ran for the workspace on that day. If it failed, view the job run details and trigger a manual re-run with the correct run date |
| Balance not deducted | Verify the period is linked to a time account. Accountless periods do not deduct any balance — that’s expected |
| Long absence is partially consumed | Periods are split by the employee’s timesheet approval period (weekly, biweekly, monthly). Each chunk is consumed on its own start date |