# Hour Advantage > Hour Advantage is a headless engine. Connect takes punches from time clocks in their own protocols and sends clean JSON events. Time and Attendance works out pay period ledgers by your business rules. Every link below is a page as plain markdown. Any docs page is also at its own address with .md on the end. ## API - [OpenAPI description](https://houradvantage.com/openapi.json): every admin API endpoint, its parameters and its answers, as OpenAPI JSON. ## Docs - [Introduction](https://houradvantage.com/docs.md): Hour Advantage is the engine you build on. Connect talks to any time clock. Time and Attendance turns punches into payable hours, and shows which rule changed each minute. - [Actions](https://houradvantage.com/docs/actions.md): Everything sent to a device is an action: a list of steps the engine tracks. Its steps go to the device in order, with one status, and a failed step ends it there. The steps are either a named... - [Architecture](https://houradvantage.com/docs/architecture.md): Hour Advantage is the engine, in two parts on one shared platform. Connect reports what happens at the clocks and runs commands. Time and Attendance decides what it means. They talk only through a public contract. - [Closed periods](https://houradvantage.com/docs/architecture/closed-periods.md): Once a pay period is closed, it stays exactly as it was paid. A change that arrives later is added as an adjustment in the open period, or is refused. - [The ledger](https://houradvantage.com/docs/architecture/ledger.md): How one person's pay period is worked out. The same fixed stages run in the same order every time. The policy's rules plug in wherever a decision varies. Decimal hours are carried so every sum agrees. - [Policy layers](https://houradvantage.com/docs/architecture/policy-layers.md): A policy is built from layers, from general to specific. Each layer changes only what it names and says whom it applies to. A lock stops lower layers from changing a rule. - [A punch's path](https://houradvantage.com/docs/architecture/punch-path.md): Follow one punch from the clock to a line in a pay period's ledger. Connect saves it before it answers the clock and says whom it is for. Time and Attendance keeps it as a fact and works it into the ledger. - [Hour Advantage Time and Attendance](https://houradvantage.com/docs/attendance.md): Time and Attendance turns punches into timecards by the pay rules you choose. Hours go into pay categories and are charged to jobs and cost centers. What happened is never overwritten, and timecards update when anything changes. - [Accruals](https://houradvantage.com/docs/attendance/accruals.md): Time off balances such as paid time off or sick time. Entries are earned, used, adjusted by hand or forfeited, and the balance is the sum of the entries. It covers setup, caps, carry-over and late changes. - [Approvals](https://houradvantage.com/docs/attendance/approvals.md): You choose what needs approving and in what stages. Each approval remembers exactly what it approved. If the time changes later, it needs approving again. - [Break attestations](https://houradvantage.com/docs/attendance/break-attestations.md): At clock-out a person says whether they got their meal and rest breaks, and why not if they did not. Your business rules use the answer to pay a premium, record a waiver or require the answer. - [From a clock to a timecard](https://houradvantage.com/docs/attendance/clock-to-timecard.md): The steps a clock's punch needs to reach a timecard, in order. This page also shows where a punch waits when a step is missing. - [Period close](https://houradvantage.com/docs/attendance/close.md): Closing a pay period keeps its timecards as they were paid. This page covers closing and reopening, automatic close, late changes (adjust or refuse), balances after a late change and reopening. - [Policy cookbook](https://houradvantage.com/docs/attendance/cookbook.md): Ready-made, tested policies for Hour Advantage Time and Attendance, by area: each rule in plain words, its policy package, and the scenarios that check it. - [Full-time status for health coverage (look-back and monthly)](https://houradvantage.com/docs/attendance/cookbook/aca-full-time-status.md): Full-time status for the employer mandate - hours of service over a 12-month look-back measurement period, an average of 130 a month or more, holding for the stability period after it; new hires measured from their hire; or each month on its own. Reported with the hours behind it; no benefit is decided. - [A waiting period before leave is used](https://houradvantage.com/docs/attendance/cookbook/accrual-waiting-period.md): Sick leave earned from the first day of work, but not used until 90 days after hire. - [Alternative workweek (four 10-hour days)](https://houradvantage.com/docs/attendance/cookbook/alternative-workweek.md): An agreed schedule of four 10-hour days: no daily overtime until the scheduled 10 hours, double time past 12, and a day beyond the schedule overtime from its first hour and double time past 8. - [A front-loaded yearly grant of paid time off](https://houradvantage.com/docs/attendance/cookbook/annual-grant.md): The year's paid time off given all at once on one day of the year, with new hires given the share for the months left. - [What blocks approval, and who approves](https://houradvantage.com/docs/attendance/cookbook/approval-routing.md): Only missing punches keep a day from approval, long overtime goes to the plant manager, and minors' timecards to HR. - [Attendance points](https://houradvantage.com/docs/attendance/cookbook/attendance-points.md): Late arrivals, early departures and no shows each earn points, raised as exceptions that say how many, for a points tally. - [Attribution by most hours](https://houradvantage.com/docs/attendance/cookbook/attribute-by-most-hours.md): A shift across a workday's start belongs whole to the workday that holds most of its hours, the day it starts in where two hold the same. - [Attribution by the scheduled shift](https://houradvantage.com/docs/attendance/cookbook/attribute-to-scheduled-shift.md): A shift belongs to the workday its scheduled shift is of, wherever the person punched: a Monday 22:00 night shift punched in at 00:05 on Tuesday is Monday's. - [An Australian modern award](https://houradvantage.com/docs/attendance/cookbook/australian-retail-award.md): The pay rules of an Australian modern award, after the General Retail Industry Award 2020, as configuration of standard steps with no Lua. - [Closing pay periods on their own](https://houradvantage.com/docs/attendance/cookbook/automatic-close.md): Each pay period closes a set number of days after it ends, with no one closing it; a punch that arrives after is paid as an adjustment in the open period, and a period reopened by hand stays open. - [Automatic meal deduction](https://houradvantage.com/docs/attendance/cookbook/automatic-meal-deduction.md): A day worked past 6 hours with no meal punched has 30 minutes deducted, as if the meal had been taken. - [The balance below an amount once a year](https://houradvantage.com/docs/attendance/cookbook/balance-below-once-a-year.md): Paid time off may go as much as 40 hours negative, but only one request a year may take it below nothing, even once it has been earned back. - [Bereavement leave by relationship](https://houradvantage.com/docs/attendance/cookbook/bereavement-leave.md): Five days of bereavement leave for a spouse or child, three for other close family; the person names the relationship in the request. - [Brazil's working hours](https://houradvantage.com/docs/attendance/cookbook/brazil-clt-working-hours.md): The working week, overtime, Sunday and holiday work, the reduced night hour, the hour bank and the paid weekly rest of Brazil's Consolidation of Labour Laws, as configuration of standard steps with no Lua. - [Meal and break attestation](https://houradvantage.com/docs/attendance/cookbook/break-attestation.md): At clock-out the person confirms they got their meal and rest breaks, or says which they did not and why: a break the employer did not provide pays its premium even where the punches look compliant, a meal waived of the person's own choice on a short day owes none, and a day left unattested is raised for review. - [Daily overtime, double time and the seventh day (California style)](https://houradvantage.com/docs/attendance/cookbook/california-overtime.md): Overtime past 8 hours a day, double time past 12, the seventh consecutive day of a workweek at overtime, and weekly overtime past 40 without counting an hour twice. - [Split shift premium at the minimum wage (California)](https://houradvantage.com/docs/attendance/cookbook/california-split-shift.md): A split shift is owed one hour at the minimum wage on top of the minimum wage for the day's hours, less what the day's pay comes to above that minimum. - [Call-back pay](https://houradvantage.com/docs/attendance/cookbook/call-back-pay.md): Each time someone is called back to work outside their scheduled shift, they are paid for at least a minimum, such as 2 hours. - [Canada's provincial employment standards](https://houradvantage.com/docs/attendance/cookbook/canada-employment-standards.md): Provincial overtime by the day and the week, averaging agreements, public holiday pay by each province's formula and vacation pay as a per cent of earnings, picked by where people work, as configuration of standard steps with no Lua. - [Certified payroll for a covered project](https://houradvantage.com/docs/attendance/cookbook/certified-payroll.md): A weekly certified payroll for each covered project: each worker, classification, hours by day (straight and overtime), rates of pay and gross for the project, for payroll to complete with deductions. - [Daily overtime past 12 hours (Colorado style)](https://houradvantage.com/docs/attendance/cookbook/colorado-overtime.md): Hours past 12 in a workday, or past 12 counted from when the work started, are overtime, and regular hours past 40 in a workweek are overtime, without counting an hour twice. - [Comp time in place of overtime pay](https://houradvantage.com/docs/attendance/cookbook/comp-time.md): Overtime earned as time off at an hour and a half for each hour, for those who choose it, banked up to 240 hours (480 for safety staff); overtime past the cap paid, and what is left paid out on leaving. - [Daily overtime where the work location's law has it](https://houradvantage.com/docs/attendance/cookbook/daily-overtime-by-location.md): Daily overtime on the days a person works where the law has it (past 8 hours in California and Alaska, past 8 in 24 hours in Nevada under its pay threshold, past 12 in Colorado), and none on the days they work elsewhere. - [Days present in each country](https://houradvantage.com/docs/attendance/cookbook/days-present-by-country.md): The days a person is present in each country, reported day by day for tax and social security, and flagged for review as a country's days in its own tax year near or pass 183. - [Exact time in decimal hours](https://houradvantage.com/docs/attendance/cookbook/decimal-hours.md): Time is kept exact and shown in the decimal hours payroll takes, two decimals or tenths, with nothing lost or made by rounding line by line. - [Punching only on the devices a person is set up for](https://houradvantage.com/docs/attendance/cookbook/device-allowed-by-attribute.md): A punch made on a device the person is not set up to use (a phone, when they are to clock in on site) is flagged for a supervisor, and still counts. - [Double punches and stepping out a moment](https://houradvantage.com/docs/attendance/cookbook/double-punch-lockout.md): A badge swiped twice within a lockout is one punch, and an out followed by an in within minutes is no break in the work. - [A yearly limit on what is earned](https://houradvantage.com/docs/attendance/cookbook/earning-capped-each-year.md): Sick leave earned at an hour for every 30 hours worked, at most 40 hours a calendar year, however much is worked. - [The 8 and 80 system (hospitals and residential care)](https://houradvantage.com/docs/attendance/cookbook/eight-and-eighty-overtime.md): Overtime past 8 hours a workday and past 80 hours in a fixed 14-day period, in place of the 40-hour week, with no hour counted twice. - [Floating holidays](https://houradvantage.com/docs/attendance/cookbook/floating-holidays.md): Two floating holidays a year, days the person picks, granted as a balance on January 1, taken as whole days, and forfeited at the year's end if unused. - [Fluctuating workweek](https://houradvantage.com/docs/attendance/cookbook/fluctuating-workweek.md): A fixed weekly salary covers every hour of the week, however many; hours past 40 are paid half the week's regular rate on top. - [A forgotten clock-out, closed at the longest shift](https://houradvantage.com/docs/attendance/cookbook/forgotten-clock-out.md): Work with no punch for longer than the longest shift is flagged, and optionally ended at the limit, so a forgotten clock-out neither pays nothing nor runs on for a day. - [Forfait jours (France)](https://houradvantage.com/docs/attendance/cookbook/france-forfait-jours.md): France's forfait jours: managers on a yearly number of days, not hours, each day worked counted and a year past 218 days flagged for review. - [France's 35-hour week](https://houradvantage.com/docs/attendance/cookbook/france-overtime.md): France's 35-hour week: the first 8 overtime hours of a week paid 25% more, those past 43 hours 50% more. - [France's yearly overtime quota and compensatory rest](https://houradvantage.com/docs/attendance/cookbook/france-overtime-quota.md): France's yearly overtime quota (contingent annuel) of 220 hours: overtime counted through the year, an hour of compensatory rest for each hour past the quota, and passing it flagged for review. - [RTT days (France)](https://houradvantage.com/docs/attendance/cookbook/france-rtt.md): RTT days in France: a 39-hour week whose 4 hours past 35 earn time off (réduction du temps de travail) rather than overtime, overtime from the 40th hour. - [Franchise pay rules, shared and locked](https://houradvantage.com/docs/attendance/cookbook/franchise-pay-rules.md): A franchisor publishes its pay rules once for every franchisee, locks its overtime rule, and each location adds its own layer. - [Frontier workers](https://houradvantage.com/docs/attendance/cookbook/frontier-workers.md): Frontier workers live in one country and work in another, going home each day: their public holidays are the work country's, and their days present count both countries. - [Night, Sunday and public-holiday supplements (Germany)](https://houradvantage.com/docs/attendance/cookbook/germany-supplements.md): Germany's supplements for night, Sunday and public-holiday work, each a per cent of the base rate paid on top: 25% at night, 50% on Sundays, 125% on public holidays, the night's stacking with either, a holiday's replacing a Sunday's. - [Germany's working hours](https://houradvantage.com/docs/attendance/cookbook/germany-working-hours.md): Germany's working hours (Arbeitszeitgesetz), flagged for review: 8 hours a working day, up to 10 where 24 weeks average 8, 11 hours' rest, and breaks of 30 minutes past 6 hours and 45 past 9. - [Habitual work share](https://houradvantage.com/docs/attendance/cookbook/habitual-work-share.md): The share of a person's working time done in the country they live in, over a rolling 12 months, flagged for a social security review when it reaches 25% or falls below it. - [When two rates tie, the higher one wins](https://houradvantage.com/docs/attendance/cookbook/highest-rate-wins.md): Work that two pay rates match as closely (one by job, one by location) is paid at the higher, or at the one a contract prefers, instead of waiting for someone to settle it. - [A holiday entered after its day is flagged](https://houradvantage.com/docs/attendance/cookbook/holiday-entered-after.md): A day that observes a holiday entered after the day ended is raised as an exception for the approver, who decides whether it was forgotten or announced late; a policy may block approval on it. - [Holidays on a weekend, observed on a weekday](https://houradvantage.com/docs/attendance/cookbook/holiday-observance.md): Which day a holiday falling on a Saturday or a Sunday is observed on (and paid), decided by the policy, not the holiday list. - [Holiday pay after a waiting period](https://houradvantage.com/docs/attendance/cookbook/holiday-pay-after-waiting-period.md): Paid holidays only for people employed on the day and for at least a set number of days, read from their employment. - [Holiday pay at average earnings](https://houradvantage.com/docs/attendance/cookbook/holiday-pay-average-earnings.md): Each day of annual leave paid at the average hourly pay of the last 52 weeks with pay, looking back up to 104 weeks, overtime, commission and allowances included. - [Holiday pay only when scheduled that day](https://houradvantage.com/docs/attendance/cookbook/holiday-pay-if-scheduled.md): A holiday pays the day's scheduled hours to people scheduled to work it, and nothing to people whose day off it falls on. - [Holiday pay for working the days around it](https://houradvantage.com/docs/attendance/cookbook/holiday-pay-if-worked-around.md): A holiday pays 8 hours to people who worked their last scheduled day before it and their first scheduled day after it; missing either, unexcused, forfeits it. - [A premium for hours worked on a holiday](https://houradvantage.com/docs/attendance/cookbook/holiday-worked-premium.md): Time worked on a holiday goes to its own category, paid at a premium, beside the holiday's own pay. - [One person's own agreement](https://houradvantage.com/docs/attendance/cookbook/individual-agreement.md): An individual agreement (a shorter week, other overtime) as a policy layer for one employee, or for one worker across every employer's record of them. - [Japan's overtime premiums and the 36 agreement](https://houradvantage.com/docs/attendance/cookbook/japan-overtime-premiums.md): Japan's premiums for overtime, overtime past 60 hours a month, night work and statutory holidays, and the 36 agreement's caps flagged for review, as configuration of standard steps with no Lua. - [Overtime across a joint employment](https://houradvantage.com/docs/attendance/cookbook/joint-employment-overtime.md): One worker employed by two employers of the tenant who count hours together; overtime past 40 hours a week counts both employments' time. - [Jury duty make-up pay](https://houradvantage.com/docs/attendance/cookbook/jury-duty-pay.md): The employer pays the difference between jury pay and the person's usual pay for their scheduled hours, for up to 10 days a year. - [Late arrival and early departure, with a grace period](https://houradvantage.com/docs/attendance/cookbook/late-and-early.md): An exception when someone starts a scheduled shift late or leaves it early, past a few minutes' grace. - [Late changes to a closed period, within limits](https://houradvantage.com/docs/attendance/cookbook/late-change-limits.md): A small change to a pay period already paid is adjusted into the next one on its own; a large one, or one made long after, is refused for payroll to look at. - [Leave approved before a holiday was announced stays charged](https://houradvantage.com/docs/attendance/cookbook/leave-charged-before-announcement.md): A business's own rule, written from the facts a policy can read (when a holiday was announced, when a leave request was approved): leave approved before the announcement stays charged to the balance, leave approved after it draws nothing on the holiday. - [Leave in whole increments](https://houradvantage.com/docs/attendance/cookbook/leave-increments.md): Sick leave taken in blocks of at least an hour, and paid time off in whole days for exempt staff; a request that is not is refused, naming the day. - [Paid leave and holidays do not count toward overtime](https://houradvantage.com/docs/attendance/cookbook/leave-not-counted-toward-overtime.md): Overtime counts hours worked; paid vacation, sick time and holiday pay are paid but not worked, so they do not push the week past 40. Or, for a company that chooses to, they do. - [Leave on a public holiday draws nothing](https://houradvantage.com/docs/attendance/cookbook/leave-on-holidays.md): A day of leave that falls on a public holiday is paid as the holiday and takes nothing from the leave balance, whether the holiday was known when the leave was asked for or announced after it was approved. - [Leave requests checked before approval](https://houradvantage.com/docs/attendance/cookbook/leave-rules.md): No more leave than the balance, none in a blackout week, short notice flagged, and long requests sent to a director. - [Local time at each site](https://houradvantage.com/docs/attendance/cookbook/local-time-at-each-site.md): Each day is worked out in the time zone of the site the person works at that day, so rules by the wall clock (a night premium, a workday's start) follow the local clock wherever they work. - [A limit each company sets in its app](https://houradvantage.com/docs/attendance/cookbook/long-day-review.md): Days longer than a limit are flagged for review, the limit set by each company in the app it uses and kept in the tenant's metadata, so one rule serves every company. - [A lunch from an out and an in](https://houradvantage.com/docs/attendance/cookbook/lunch-from-out-and-in.md): A plain out and an in within 90 minutes are a lunch: breaks are counted, and the work after it is the same shift. - [Customization points](https://houradvantage.com/docs/attendance/cookbook/map.md): Every point where you change what Hour Advantage does, mapped to the recipes that show it: stages, standard steps, settings, layers, eligibility, packages, what a step reads, and the Connect hooks. - [Meal period premium (California style)](https://houradvantage.com/docs/attendance/cookbook/meal-period-premium.md): A day with more than 5 hours of work whose meal did not start by the end of the fifth hour pays an extra hour, as does a day of more than 10 hours whose second meal did not start by the end of the tenth. - [Mexico's Federal Labour Law](https://houradvantage.com/docs/attendance/cookbook/mexico-federal-labour-law.md): Overtime double for the first 9 hours of a week and triple after, work on the weekly rest day paid double, and the Sunday premium, as configuration of standard steps with no Lua. - [Minimum wage by location](https://houradvantage.com/docs/attendance/cookbook/minimum-wage-by-location.md): The hours worked in each city are paid at least that city's minimum wage, in the week they are worked; what the pay rate falls short of is made up. - [Hours limits for minors](https://houradvantage.com/docs/attendance/cookbook/minor-hours.md): Exceptions when a person flagged as a minor works past a daily or weekly limit, or in the evening or early morning. - [Missed rest break](https://houradvantage.com/docs/attendance/cookbook/missed-break.md): A workday whose hours call for more rest breaks than were punched raises a missed_break exception. - [The Netherlands' working hours](https://houradvantage.com/docs/attendance/cookbook/netherlands-working-hours.md): The Netherlands' working hours (Arbeidstijdenwet), where they differ from the EU directive's, flagged for review: 12 hours a shift, 60 a week, 55 a week over 4 weeks and 48 over 16, 36 hours' weekly rest, and breaks past 5.5 and 10 hours. - [Daily overtime in 24 hours from the start of work (Nevada style)](https://houradvantage.com/docs/attendance/cookbook/nevada-daily-overtime.md): Hours past 8 in the 24 hours from when work starts are overtime, so an early start the next day cannot hide a long day. - [New Zealand's Holidays Act](https://houradvantage.com/docs/attendance/cookbook/new-zealand-holidays-act.md): Public holidays paid as the day would have been on an otherwise working day, decided by the roster or the pattern of work, as configuration of standard steps with no Lua. - [Night shift differential](https://houradvantage.com/docs/attendance/cookbook/night-differential.md): Time worked between 22:00 and 06:00 on the wall clock is paid in a night category, across midnight and changes of the clocks. - [A 9/80 schedule's workweek](https://houradvantage.com/docs/attendance/cookbook/nine-eighty-workweek.md): Eighty hours in nine working days, with a workweek that starts at Friday noon so neither week goes past 40 hours. - [No pyramiding of premiums](https://houradvantage.com/docs/attendance/cookbook/no-pyramiding.md): No hour is paid two premiums: daily overtime is not counted again toward weekly overtime, and holiday hours paid at the holiday premium are not counted toward either. - [No show](https://houradvantage.com/docs/attendance/cookbook/no-show.md): An exception for a scheduled day with no work on it, unless approved leave, a day taken off or a holiday excuses it. - [On-call allowance and call-outs](https://houradvantage.com/docs/attendance/cookbook/on-call.md): An allowance for every hour on call, and work done when called out paid as call-out time, each call-out for at least a minimum. - [Overnight shifts: which workday the hours belong to](https://houradvantage.com/docs/attendance/cookbook/overnight-shifts.md): A shift that runs past the start of the next workday belongs whole to the day it starts, whole to the day it ends, or is split at the workday boundary, as the policy says. - [Overtime only after scheduled hours](https://houradvantage.com/docs/attendance/cookbook/overtime-after-schedule.md): Time worked past the day's scheduled shift is overtime; work on a day with no shift is overtime or regular, as the policy chooses. - [Overtime by jurisdiction, picked by where people work](https://houradvantage.com/docs/attendance/cookbook/overtime-by-jurisdiction.md): One package of overtime rules for several countries and provinces, each applying to the people working in its jurisdiction by an eligibility rule, with no Lua. - [Overtime cost spread over the branches worked at](https://houradvantage.com/docs/attendance/cookbook/overtime-cost-spread.md): The overtime premium's cost spread over the branches, cost centers or assignments a person worked at in the week, in proportion to the hours at each, instead of falling on the one worked last. - [Overtime equalization counts](https://houradvantage.com/docs/attendance/cookbook/overtime-equalization.md): Overtime equalization counts for a union shop - each person's overtime hours worked, refused and offered so far in the year, kept as balances the app reads to offer the next overtime evenly. - [Paid rest breaks](https://houradvantage.com/docs/attendance/cookbook/paid-rest-breaks.md): Short punched breaks count as hours worked and are paid; a break longer than a rest break is flagged for review. - [Pay rising with hours worked (apprenticeship rungs, union steps)](https://houradvantage.com/docs/attendance/cookbook/pay-rate-by-hours-worked.md): Pay rising with hours worked (apprenticeship rungs, union steps) - the rate in effect is the rung the hours worked to date in the classification reached, every 1,000 hours, paid from the pay period after a rung is reached. - [Payroll exports with earning codes](https://houradvantage.com/docs/attendance/cookbook/payroll-export.md): A pay period's hours written for a payroll system, categories mapped to its earning codes, as a summary CSV or a fixed-width file. - [The Philippines' premium pay](https://houradvantage.com/docs/attendance/cookbook/philippines-premium-pay.md): Overtime, the night shift differential, holiday pay and the rest-day premium of the Philippine Labor Code, each compounding on the others, as configuration of standard steps with no Lua. - [Piece rate by job](https://houradvantage.com/docs/attendance/cookbook/piece-rate.md): Pay for each unit produced, at a rate matched on the work's context (the job, the line, the assignment), changing from a date. - [Posted workers](https://houradvantage.com/docs/attendance/cookbook/posted-workers.md): Workers posted from one country to another keep their contract's pay and overtime, and are owed at least the host country's minimum hourly rate and overtime premium for the work done there, compared each week. - [Predictive scheduling (fair workweek)](https://houradvantage.com/docs/attendance/cookbook/predictive-scheduling.md): The hours worked within 10 hours of the last shift's end are paid at a premium, and a schedule changed within 14 days of the day pays an hour, or half the hours taken away. - [Prevailing wage on public works](https://houradvantage.com/docs/attendance/cookbook/prevailing-wage.md): Hours on a covered public works project are paid at least the project's base rate for the classification worked, overtime at one and a half times the base, and the fringe for every hour, met by benefits or paid as cash. - [Work with no assignment goes to the primary one](https://houradvantage.com/docs/attendance/cookbook/primary-assignment.md): A person with several assignments who punches without naming one has the work put on their primary assignment, instead of an exception for each shift. - [A productivity bonus over a target](https://houradvantage.com/docs/attendance/cookbook/productivity-bonus.md): An hourly bonus for every hour of a day whose output meets a target rate, decided on exact time. - [Family and medical leave](https://houradvantage.com/docs/attendance/cookbook/protected-leave.md): 12 weeks of protected leave a year, counted by the hour against the person's usual week, for someone with 12 months of service and 1,250 hours worked; paid time off used first, and protected leave never refused for its balance. - [Public holidays by location](https://houradvantage.com/docs/attendance/cookbook/public-holidays-by-location.md): Public holidays as the tenant's own data: one list of holidays, each work location listing those it keeps, and substitute days where a holiday on a weekend moves to the next free weekday. - [Overtime at the regular rate](https://houradvantage.com/docs/attendance/cookbook/regular-rate-overtime.md): Weekly overtime at one and a half times the regular rate: the week's pay at every rate worked, its shift differentials and its nondiscretionary bonuses, over the hours worked. - [Reporting time pay](https://houradvantage.com/docs/attendance/cookbook/reporting-time-pay.md): Someone who reports for a scheduled shift and is sent home early is paid for at least a minimum, a flat number of hours or half the shift. - [Too little rest between shifts](https://houradvantage.com/docs/attendance/cookbook/rest-between-shifts.md): An exception when a shift starts less than a set time, such as 10 hours, after the last one ended. - [Rest period premium (California style)](https://houradvantage.com/docs/attendance/cookbook/rest-period-premium.md): A day whose work called for more paid rest breaks than were taken pays an extra hour, once, beside the meal premium. - [Rolled-up holiday pay and vacation pay as a per cent of earnings](https://houradvantage.com/docs/attendance/cookbook/rolled-up-holiday-pay.md): Holiday pay paid with each period's wages as a per cent of them: 12.07% for irregular-hours and part-year workers, the same step paying a vacation pay of 4% or 6% of what was earned. - [Rounding that leaves meal punches alone](https://houradvantage.com/docs/attendance/cookbook/rounding-without-meals.md): The day's in and out punches round to the quarter hour; lunch punches stay exactly as punched, so the meal taken is the meal on the timecard. - [Rounding to the quarter hour (the 7-minute rule)](https://houradvantage.com/docs/attendance/cookbook/seven-minute-rounding.md): Punches are taken at the nearest quarter hour, 1 to 7 minutes past rounding down and 8 to 14 rounding up. - [Shift differentials by the shift worked](https://houradvantage.com/docs/attendance/cookbook/shift-differential.md): Work on the evening or night shift earns an extra amount for every hour, overtime hours included, decided by the scheduled shift the work is on rather than the clock on the wall. - [Matching work to the right shift](https://houradvantage.com/docs/attendance/cookbook/shift-matching.md): Work is matched to the shift whose start is nearest, within a window either side, so an early arrival for the swing shift is not a late arrival for the day shift. - [Sick leave with a cap and a yearly carryover limit](https://houradvantage.com/docs/attendance/cookbook/sick-leave-carryover.md): Sick leave earned by hours worked up to a cap, with what the balance holds over a limit lost when a new year starts. - [Sick leave, one hour for every 30 worked](https://houradvantage.com/docs/attendance/cookbook/sick-leave-one-per-thirty.md): Paid sick leave earned at one hour for every 30 hours worked, in proportion, up to a cap, drawn down by sick leave taken. - [A remote site allowance set on the organization tree](https://houradvantage.com/docs/attendance/cookbook/site-allowance.md): Every hour worked at a remote site earns an allowance whose amount is kept on the site, or inherited from the nearest region above it, in the tenant's organization tree. - [Snap early punches to the scheduled start](https://houradvantage.com/docs/attendance/cookbook/snap-to-schedule.md): An in punch a few minutes before the shift is paid from the shift's start, and an out punch a few minutes after it to the shift's end; everything else as punched. - [Spain's daily record of working time](https://houradvantage.com/docs/attendance/cookbook/spain-daily-record.md): Spain's daily record of working time (registro de jornada): for each person and day, when work started and ended, its breaks and hours, from the punches as worked, kept and exported for an inspection. - [Split shift premium](https://houradvantage.com/docs/attendance/cookbook/split-shift-premium.md): A workday whose work is split by an unpaid gap of more than an hour pays an extra hour. - [A staffing agency's placements, pay and billing](https://houradvantage.com/docs/attendance/cookbook/staffing-agency.md): Placements become assignments, each paid at its pay rate and billed to its client at its bill rate; payroll and client invoices are exported, and each client approves the hours of its own placement. - [Rounding to the tenth of an hour](https://houradvantage.com/docs/attendance/cookbook/tenth-hour-rounding.md): Punches are taken at the nearest 6 minutes, so every stretch of work is a whole number of tenths of an hour. - [Time zones in one day](https://houradvantage.com/docs/attendance/cookbook/time-zones-in-one-day.md): Work in two time zones in one day, a flight from London to Berlin mid-shift, is exact time, and each instant of it belongs to one workday, cut at each workday's start in the zone of that day. - [Tips as money, and the tip credit](https://houradvantage.com/docs/attendance/cookbook/tips.md): Tips reported as money beside the hours, and the difference made up when a week's tips and cash wage fall short of the minimum wage. - [Two employments in two countries](https://houradvantage.com/docs/attendance/cookbook/two-employments-in-two-countries.md): One worker employed by two employers in two countries: the 48-hour weekly average of the working time limits counts the hours of both employments. - [Overtime past the contract's hours, by where the hour fell](https://houradvantage.com/docs/attendance/cookbook/uk-contract-overtime.md): Overtime starts only after the contract's hours at basic rate; which hours are overtime is the employer's choice, and each is paid by where it fell against the shift: before it, in it or after it. - [UK holiday entitlement from an April leave year](https://houradvantage.com/docs/attendance/cookbook/uk-holiday-entitlement.md): UK statutory holiday: 5.6 weeks a leave year from 1 April, a new starter's share by the months left, up to 8 days carried over, and irregular-hours workers earning 12.07% of the hours they work. - [UK National Minimum Wage over the pay reference period](https://houradvantage.com/docs/attendance/cookbook/uk-minimum-wage.md): The UK National Minimum Wage, checked over each pay reference period: a salaried worker's salary or an hourly worker's basic pay, over the hours worked in it, made up to the minimum of their age band. - [Statutory Sick Pay waiting days](https://houradvantage.com/docs/attendance/cookbook/uk-statutory-sick-pay.md): Statutory Sick Pay's waiting days: the first three days of a period of incapacity of four days or more unpaid, periods within eight weeks linked, and none from 6 April 2026. - [A union contract for its members](https://houradvantage.com/docs/attendance/cookbook/union-contract.md): A collective agreement's shorter week and double time for long days, applied to everyone in the union local or a shop under it, with a new contract taking effect on its first day. - [Punches of unknown direction](https://houradvantage.com/docs/attendance/cookbook/unknown-punch-direction.md): On a clock without in and out keys, a punch after a long gap, or nearer a shift's start, is an in, so one stray or missing punch does not turn the rest around. - [Asking who an unlinked person is](https://houradvantage.com/docs/attendance/cookbook/unlinked-people.md): Someone who punches before anyone has linked them to an employee has their hours worked out and shown, and each day they work asks for the link. - [Vacation earned by years of service](https://houradvantage.com/docs/attendance/cookbook/vacation-by-service.md): Vacation earned on hours worked at a rate that steps up with years of service, changing on the work anniversary itself. - [Weekend night premium](https://houradvantage.com/docs/attendance/cookbook/weekend-night-premium.md): Time worked at night on a Saturday or a Sunday, between 22:00 and 06:00 on the wall clock, is paid in a weekend night category, across midnight and changes of the clocks. - [Weekend premium](https://houradvantage.com/docs/attendance/cookbook/weekend-premium.md): Time worked on a Saturday or Sunday workday is paid in a weekend premium category. - [Weekly overtime over 40 hours](https://houradvantage.com/docs/attendance/cookbook/weekly-overtime.md): Time worked past 40 hours in a workweek is overtime, counted in the week it was worked, across pay periods. - [A week worked in several countries](https://houradvantage.com/docs/attendance/cookbook/work-in-several-countries.md): A week worked in two countries under one contract: the contract's working-time rules count every hour of it, each day keeps the public holidays of the country it is worked in, and each line records its country. - [Work period overtime for fire and police](https://houradvantage.com/docs/attendance/cookbook/work-period-overtime.md): Fire protection and law enforcement overtime by work period: time worked past the threshold for a work period of 7 to 28 days, anchored on the agency's chosen start date, instead of past 40 hours a week. - [Working-time account](https://houradvantage.com/docs/attendance/cookbook/working-time-account.md): A working-time account (Arbeitszeitkonto): each week's hours over or under the person's target added to or taken from a balance of hours, and a balance past its limits flagged. - [Working time limits (EU Working Time Directive)](https://houradvantage.com/docs/attendance/cookbook/working-time-directive.md): The EU Working Time Directive's limits, flagged for review and never paid: 48 hours a week averaged over 17 weeks, 11 hours' daily rest, a weekly rest, a break after 6 hours, and night workers' 8 hours in 24. - [A law that changes on a date](https://houradvantage.com/docs/attendance/cookbook/working-week-by-law.md): The legal working week kept as a shared package, each reform published as a new version in force from the day the law says, followed by every tenant that adopts it. - [The year's end, kind by kind](https://houradvantage.com/docs/attendance/cookbook/year-end-by-category.md): At the new year, vacation carried over up to 40 hours and the rest paid out, sick leave carried over up to 48 hours and the rest forfeited, and personal time paid out whole. - [Punch deliveries](https://houradvantage.com/docs/attendance/deliveries.md): How punches get into a Time and Attendance tenant. A sender can be a Connect sink on the same install, another install, or any system that signs its deliveries with one of the tenant's delivery keys. This page also says what happens to a refused delivery and to a punch that cannot be read. - [Exceptions](https://houradvantage.com/docs/attendance/exceptions.md): An exception is a flag that Time and Attendance raises instead of guessing. Examples are a missing punch or a late change to a closed period. Your own rules can flag lateness or missed shifts too. - [Every minute explained](https://houradvantage.com/docs/attendance/explained.md): Every line of a timecard says where its time came from and which business rule changed it. The line names the policy layer and the reason, so you can trace any minute back to its punch. - [Labor context](https://houradvantage.com/docs/attendance/labor-context.md): Every stretch of work is charged to something, such as an assignment, job or cost center. This page covers setup, where each value comes from, exceptions, dated changes and spreading overtime cost. - [Labor entries and rates](https://houradvantage.com/docs/attendance/labor-entries.md): Work recorded as an amount instead of punched: hours without punches such as leave and holidays, counts such as boxes packed, and money such as tips. It also covers how rates are picked. - [Leave requests](https://houradvantage.com/docs/attendance/leave.md): A leave request asks for time off ahead of time, or after the fact for a sick day. Approvers decide it in stages, like a timecard. Once approved, its hours go on the timecard in their pay category and come out of the right time-off balance. - [Allocations and the ledger](https://houradvantage.com/docs/attendance/ledger.md): A pay period's ledger is its timecard. It covers lines, pay categories, pay periods, hours as decimals, days and weeks, what a timecard shows, and recalculation. - [Employers, organizations and locations](https://houradvantage.com/docs/attendance/organizations.md): How a tenant's structure is kept: employers, records, workers, hierarchies, dated moves, work locations, where a person is, lists by organization and approval stages. - [Payroll export](https://houradvantage.com/docs/attendance/payroll-export.md): Write a pay period's timecards to a file for your payroll system, in the format it imports. Exports leave out time that is about to change. You can see whose time changed since the last export. - [People and employment](https://houradvantage.com/docs/attendance/people.md): A person's employment history: hired, terminated, leave started and ended, and details such as exempt or the state they work in, each from the day it takes effect. Your policies read it to decide overtime, holiday pay and more. - [Policies](https://houradvantage.com/docs/attendance/policies.md): A policy decides how a person's time is worked out: how days, weeks and pay periods are counted, and which pay rules apply. It is built in layers, each for the people its eligibility rule picks. It comes in packages that a tenant adopts. - [Policy step reference](https://houradvantage.com/docs/attendance/policy-steps.md): Everything a policy step can declare and call: its parts, parameter types, reasons, time in Lua, each stage and what ctx gives it, exporters, the sandbox and the package layout. - [Punches and segments](https://houradvantage.com/docs/attendance/punches.md): A punch is kept exactly as it came in. Corrections sit beside punches instead of changing them. Punches are paired into stretches of work, lunch and break, each in one workday. Anything that doesn't pair up is flagged. - [Running it](https://houradvantage.com/docs/attendance/running.md): How to turn Time and Attendance on and send each tenant its punches from Connect. It also explains what happens to a punch after it arrives, and how a person's ledgers are worked out again. - [Scenarios](https://houradvantage.com/docs/attendance/scenarios.md): A scenario is one person's facts, setup and policy in TOML, with what their week, pay period or export must come to. Use scenarios to test a policy package before you publish it. This page has the format and every key. - [Scenario catalogue](https://houradvantage.com/docs/attendance/scenarios/catalogue.md): The scenarios that come with Hour Advantage Time and Attendance, grouped by the rule each one checks: the standard steps' by step, then the rest by area. - [Schedules](https://houradvantage.com/docs/attendance/schedules.md): When people are meant to work: repeating shifts, changes to a single date and holidays. Work is matched to the shifts. Your policies decide what lateness, missed shifts and holidays mean. - [Shift cost estimates](https://houradvantage.com/docs/attendance/shift-costs.md): Ask what proposed shifts would add to each person's pay before anyone works them. You get hours and labor cost for a scheduling system or a draft schedule. Nothing is recorded, and it is not payroll. - [Pay and bill](https://houradvantage.com/docs/attendance/sides.md): The same hours worked out twice: once for what the person is paid and once for what the customer is billed. Each side has its own timecard, rules, rates and approvals. - [Standard steps](https://houradvantage.com/docs/attendance/standard-steps.md): Every rule in the standard policy package, by stage: what each step does, its parameters and defaults, how periods and reasons work, and an example. - [Storage](https://houradvantage.com/docs/attendance/storage.md): What the attendance store keeps for each tenant (facts, setup revisions, policy layers and packages, its structure, and the ledgers worked out from them) and how it treats each. It also covers Postgres and backups. - [Tenants](https://houradvantage.com/docs/attendance/tenants.md): Each customer of a Time and Attendance install is a tenant, a hard boundary around its people, rules, ledgers and events. This page covers creating, suspending and deleting tenants, writing one out and loading it elsewhere, sending its events to your systems and fair recalculation. - [Unlinked people](https://houradvantage.com/docs/attendance/unlinked.md): People enrolled at a clock who are not yet linked to an employee. How they appear, how their hours are worked out, and how to link or unlink them and read the events and lists. - [Write a policy step](https://houradvantage.com/docs/attendance/writing-policy-steps.md): Write a policy step of your own in Lua, test it with scenarios, and publish it in a policy package, for a business rule no standard step makes. - [Biometric data](https://houradvantage.com/docs/biometrics.md): How Hour Advantage handles fingerprint, face and palm templates, photos and identity documents. This page covers the endpoint opt-in, the per-person flag, refused and withdrawn data, sync groups, packages and other places such data appears. - [Business models](https://houradvantage.com/docs/business-models.md): How eight kinds of business fit the two engines. They range from a single company to a service for your customers, a staffing agency, a clock dealer, or a platform that embeds one engine. - [4. A clock dealer](https://houradvantage.com/docs/business-models/clock-dealer.md): You look after clocks for hundreds of small businesses with Connect alone. You run one listener and one endpoint per customer. Punches go to each customer's own system. - [5. An embedded engine](https://houradvantage.com/docs/business-models/embedded-engine.md): Your workforce management platform embeds one engine. Connect reaches the clocks, or Time and Attendance works out time. You keep everything else. - [7. A franchise](https://houradvantage.com/docs/business-models/franchise.md): Franchisees are each their own tenant. They share one set of pay rules that the franchisor publishes once. Each can add local changes, but not change what the franchisor locks. - [3. A labor pool](https://houradvantage.com/docs/business-models/labor-pool.md): Your platform has a clock at every business its labor pool serves. You are one tenant in each engine, with employers inside it. A worker has one employee record for each employment. - [2. A multi-tenant service](https://houradvantage.com/docs/business-models/multi-tenant-service.md): You own the install and sell time and attendance to other companies. Each customer is a tenant in both engines. - [6. A multinational](https://houradvantage.com/docs/business-models/multinational.md): One enterprise with subsidiaries in three countries. It is one tenant, with an employer for each subsidiary. Work location picks the pay rules, and one hierarchy handles approvals. - [1. A single company](https://houradvantage.com/docs/business-models/single-company.md): A manufacturer with three plants runs its own time and attendance. It has one tenant in each engine, and the endpoint's default route links the two. - [8. A staffing agency](https://houradvantage.com/docs/business-models/staffing-agency.md): An agency places workers with clients. Each placement is paid at its pay rate and billed at its bill rate. The same hours are worked out for pay and for billing, and each client approves only its own hours. - [Deploying](https://houradvantage.com/docs/deploy.md): Ways to run Hour Advantage, from one container to a cluster: containers, Docker Compose, Kubernetes, systemd and the Windows service. An instance needs only Postgres and a few environment variables. - [Docker Compose](https://houradvantage.com/docs/deploy/compose.md): HAProxy in front of several Hour Advantage instances that share one Postgres and a Valkey: how it works, ports, running it, adding a port, scaling, updating, backup and restore, wire capture, external Postgres and tear down. - [Kubernetes](https://houradvantage.com/docs/deploy/kubernetes.md): A reference deployment on Kubernetes with plain manifests and a kustomization.yaml: ports, health, draining, secrets, metrics, adding a port, client addresses, Postgres and PgBouncer, running it and upgrading packages. - [Sizing and scaling](https://houradvantage.com/docs/deploy/scaling.md): How to size an instance, when to add more, and how to run Hour Advantage so it stays up: scale up with more cores, scale out with more instances, and keep a spare. - [Hour Advantage Connect](https://houradvantage.com/docs/device-integration.md): Connect sits between time clocks and your systems. Clocks talk to it in their own protocol. Your systems get JSON events in one format, and one API sends commands back. - [Devices](https://houradvantage.com/docs/devices.md): Connect keeps a list of every clock that calls in. This page covers allowing or blocking a clock, keys, labels, sending work, holds, last seen, health, rate limit and failed messages. - [Environments, vars and secrets](https://houradvantage.com/docs/environments.md): Each cluster is one environment with its own database. This page covers naming an environment, vars and secrets, their scopes, when a change takes effect, what a package requires, and values in development and scenarios. - [after-restore.sql](https://houradvantage.com/docs/files/after-restore-sql.md): text title="after-restore.sql" -- Run once after restoring a backup, before any instance starts: -- -- psql "$DATABASEURL" -v ONERRORSTOP=1 -f after-restore.sql -- -- A restored database numbers... - [docker-compose.external-db.yml](https://houradvantage.com/docs/files/deploy/compose/docker-compose-external-db-yml.md): yaml title="deploy/compose/docker-compose.external-db.yml" # Use a Postgres you already run instead of the bundled one: # #... - [docker-compose.yml](https://houradvantage.com/docs/files/deploy/compose/docker-compose-yml.md): yaml title="deploy/compose/docker-compose.yml" # Hour Advantage as a cluster: HAProxy in front of N gateway instances sharing # one Postgres and one Valkey (the cache and the messages between the... - [.env.example](https://houradvantage.com/docs/files/deploy/compose/env-example.md): sh title="deploy/compose/.env.example" # Copy to .env next to docker-compose.yml and fill in. Needs Docker Compose # 2.24+ and Docker Engine 25+. The secrets below reach the containers as # files... - [haproxy.cfg](https://houradvantage.com/docs/files/deploy/compose/haproxy-cfg.md): ini title="deploy/compose/haproxy.cfg" # HAProxy in front of the Hour Advantage instances of the compose stack. # # Discovery: the compose service name "gateway" resolves, through Docker's #... - [houradvantage-setup.toml](https://houradvantage.com/docs/files/deploy/compose/houradvantage-setup-toml.md): toml title="deploy/compose/houradvantage-setup.toml" # The cluster's listeners and endpoints, in the hourctl apply layout # (see the example setup file in the Hour Advantage docs). They are kept... - [rolling-update.ps1](https://houradvantage.com/docs/files/deploy/compose/rolling-update-ps1.md): powershell title="deploy/compose/rolling-update.ps1" <# .SYNOPSIS Replaces the gateway containers of the compose stack one at a time, so clocks are never turned away: docker compose up -d after a... - [rolling-update.sh](https://houradvantage.com/docs/files/deploy/compose/rolling-update-sh.md): sh title="deploy/compose/rolling-update.sh" #!/bin/sh # Replaces the gateway containers of the compose stack one at a time, so # clocks are never turned away: docker compose up -d after a new... - [devices-service.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/devices-service-yaml.md): yaml title="deploy/kubernetes/devices-service.yaml" # The device ports, exposed by a Service of type LoadBalancer in front of # the gateway pods. Exposure is deploy config, listeners are runtime... - [gateway-deployment.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/gateway-deployment-yaml.md): yaml title="deploy/kubernetes/gateway-deployment.yaml" apiVersion: apps/v1 kind: Deployment metadata: name: houradvantage-gateway labels: app.kubernetes.io/name: houradvantage... - [gateway-hpa.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/gateway-hpa-yaml.md): yaml title="deploy/kubernetes/gateway-hpa.yaml" apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: houradvantage-gateway labels: app.kubernetes.io/name: houradvantage... - [gateway-pdb.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/gateway-pdb-yaml.md): yaml title="deploy/kubernetes/gateway-pdb.yaml" apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: houradvantage-gateway labels: app.kubernetes.io/name: houradvantage... - [gateway-secret.example.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/gateway-secret-example-yaml.md): yaml title="deploy/kubernetes/gateway-secret.example.yaml" # An example only, not in kustomization.yaml: applying it would overwrite # the real Secrets with placeholders. Create them out of band... - [gateway-service.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/gateway-service-yaml.md): yaml title="deploy/kubernetes/gateway-service.yaml" # The admin API of the gateway pods (9090), inside the cluster only: for the # setup Job and hourctl. Never expose it with the device ports #... - [houradvantage-setup.toml](https://houradvantage.com/docs/files/deploy/kubernetes/houradvantage-setup-toml.md): toml title="deploy/kubernetes/houradvantage-setup.toml" # The cluster's listeners and endpoints, in the hourctl apply layout # (see the example setup file in the Hour Advantage docs). The... - [kustomization.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/kustomization-yaml.md): yaml title="deploy/kubernetes/kustomization.yaml" # Hour Advantage on Kubernetes: gateway Deployment and a Valkey, behind a Service of type # LoadBalancer (the device ports), external Postgres.... - [networkpolicy.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/networkpolicy-yaml.md): yaml title="deploy/kubernetes/networkpolicy.yaml" # Who may reach the gateway pods and the setup Job, and what they may reach. # Needs a network plugin that enforces NetworkPolicy (Calico, Cilium,... - [setup-job.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/setup-job-yaml.md): yaml title="deploy/kubernetes/setup-job.yaml" # Pushes and activates the package bundles the image carries # (/usr/share/houradvantage/packages), then applies houradvantage-setup.toml #... - [valkey-statefulset.yaml](https://houradvantage.com/docs/files/deploy/kubernetes/valkey-statefulset-yaml.md): yaml title="deploy/kubernetes/valkey-statefulset.yaml" # The Valkey the gateway pods share: their cache of what they keep of the devices, and the messages they send each other of a change. #... - [setup.toml](https://houradvantage.com/docs/files/examples/setup-toml.md): toml title="examples/setup.toml" # Hour Advantage setup file: the input to hourctl apply. # # This is NOT a config file the gateway reads. The gateway keeps its # listeners, endpoints, sinks and... - [houradvantage.service](https://houradvantage.com/docs/files/packaging/systemd/houradvantage-service.md): ini title="packaging/systemd/houradvantage.service" # systemd unit for Hour Advantage. # # Layout assumed here (change the paths to suit): # /usr/local/bin/hourd the binary #... - [Jobs](https://houradvantage.com/docs/jobs.md): Run one action over many devices: targets, waves, time windows in each device's time zone, timeouts, the abort threshold, job commands and events. - [MQTT](https://houradvantage.com/docs/mqtt.md): How Connect serves clocks over MQTT: when a message is acknowledged, held and tried again, or set aside, what it asks of the broker, per-device credentials, topic ACLs and blocking a clock. - [Networking](https://houradvantage.com/docs/networking.md): How clocks reach Connect: listeners, endpoints, paths and ports, the load balancer in front, client addresses, the PROXY protocol, IP lists, keeping customers apart and health checks. - [Operations](https://houradvantage.com/docs/operations.md): Running Hour Advantage in production: the database, startup and shutdown, probes, clustering, retention, backups, admin access, secrets at rest, upgrades, logs, metrics and alerts. - [Packages](https://houradvantage.com/docs/packages.md): A protocol package teaches Connect one clock protocol. This page covers the official packages, and how an install gets, runs, upgrades and rolls back packages. - [Developing packages](https://houradvantage.com/docs/packages/developing.md): How to build a package against a real clock on your bench: test it offline, run it with live reload, seed the clock, capture what it sends, replay captures as tests, then build and push. - [Host API](https://houradvantage.com/docs/packages/host-api.md): The functions a protocol package can call. This page covers the sandbox's rules, helpers, time, bytes, text, XML, CSV, images, crypto, and the shared library's modules. - [Package reference](https://houradvantage.com/docs/packages/reference.md): Everything a protocol package declares: package.toml, what main.lua returns, routes, commands, parameters, standard actions, settings, sync groups and effects. - [Scenario tests](https://houradvantage.com/docs/packages/scenarios.md): The scenario test file format for protocol packages. This page covers steps for messages, commands, actions, keys and sync passes, what each step can expect, and how coverage is counted. - [Writing packages](https://houradvantage.com/docs/packages/writing.md): How to write a protocol package: a first package from scratch, how a package handles a clock's messages and commands, mapping standard actions, device keys, sync groups, events, batch uploads and tests. - [ZKTeco PUSH (ADMS) packages](https://houradvantage.com/docs/packages/zk.md): The zk-push packages: which version fits your clocks, endpoint options, time and daylight saving, stamps, draining, routes, events, standard and package actions, and sync group settings. - [Shared platform](https://houradvantage.com/docs/platform.md): What Connect and Time and Attendance both run on: the store, the outbox and sinks, external ids, packages and the Luau sandbox, settings, environments, and the admin API with its sign-in and audit trail. - [External ids](https://houradvantage.com/docs/platform/external-ids.md): Each system may know a person by a different id. This page covers the map of other systems' ids, setting it, events that carry the receiver's id, and finding a person by your id. - [Packages and Lua](https://houradvantage.com/docs/platform/packages.md): Both engines keep what varies in Lua packages: protocol packages, Connect policy packages and Time and Attendance policy packages. This page covers the sandbox, scenarios as tests, revisions, versions and shared packages. - [Settings and policies](https://houradvantage.com/docs/platform/settings.md): Where configuration lives: cluster settings and setup kept in the database, environments, vars and secrets, and Time and Attendance's policies, which are layered and dated per person. - [Sinks and webhooks](https://houradvantage.com/docs/platform/sinks.md): Every event is stored first. Each sink is then sent its events in the order they were stored, at least once, as signed webhooks. Covers sinks, defaults, batches, signatures, positions and in-process sinks. - [Connect policy packages](https://houradvantage.com/docs/policy.md): A policy package holds a tenant's own decisions for a few moments: routing a punch, a clock joining, moving or coming back, and a person enrolled at a clock. It covers hooks, routes, enrollment, pushing packages, shared packages that tenants adopt, and recipes. - [Connect policy recipes](https://houradvantage.com/docs/policy/recipes.md): Ready-made, tested Connect policy packages: a tenant's decisions at the clock, one recipe for each hook, each with its package and the scenarios that prove it. - [A clock's life: put into service, back](https://houradvantage.com/docs/policy/recipes/clock-lifecycle.md): A clock put into service has its information read; back after more than a week away, its information is read again. Its punches are never cleared, and its time and people are not the recipe's to set. - [Enrolling at an agency's clock](https://houradvantage.com/docs/policy/recipes/enroll-for-the-agency.md): Workers enrolled at a staffing agency's clock are routed to the agency under their worker number, labelled with the clock's site, and noted with the clock that enrolled them. - [Linking people by their PIN](https://houradvantage.com/docs/policy/recipes/link-by-pin.md): People enrolled at the clock under their payroll number are linked by it at once, and sent to every clock of the group. - [Clocks shared by several staffing agencies](https://houradvantage.com/docs/policy/recipes/multi-agency-clock.md): Clocks at a client's sites serve the workers of several agencies; the clock's site picks the agency whose placement is there, and the work code picks between two at one site. - [Onboarding through HR first](https://houradvantage.com/docs/policy/recipes/onboard-first.md): Someone enrolled at an ordinary clock has skipped onboarding and is deleted; at a supervisor's clock, they are kept unlinked until HR links them. - [A clock back from repair](https://houradvantage.com/docs/policy/recipes/repaired-clock.md): A clock back after days away is checked and has every punch it holds read again overnight; back from a short outage, nothing is done. - [Routing by work code](https://houradvantage.com/docs/policy/recipes/route-by-work-code.md): A worker placed by several staffing agencies enters a work code at the clock, and the route with that code takes the punch. - [Promoting the setup](https://houradvantage.com/docs/promote.md): Build and try the setup on a test cluster, compare it with production, and copy it there with one command, keeping each environment's own addresses and secrets. - [Quick start](https://houradvantage.com/docs/quickstart.md): Run Hour Advantage on your own machine. Use curl to pretend to be a ZKTeco clock, and see a device, a punch and a command, with no clock hardware. - [Reference](https://houradvantage.com/docs/reference.md): Look-up tables: the environment variables an instance reads, the settings kept in the database, the setup file layout, endpoint options, and links to the rest of the reference. - [Admin API](https://houradvantage.com/docs/reference/admin-api.md): The HTTP API that runs and changes the gateway: where it listens, how to log in, tokens, errors, paging, retries, sensitive values, actions and their statuses, and hourctl. - [Attendance API](https://houradvantage.com/docs/reference/attendance-api.md): Every Time and Attendance route over HTTP, under /api/attendance, and the matching hourctl attend commands: tenants, ledgers, facts, timecards, exceptions, leave, who is in, exports, who waits to be worked out again, employers, hierarchies, locations, clocks, unlinked people, setup, policy layers and packages, sinks and events. - [Command line](https://houradvantage.com/docs/reference/cli.md): Hour Advantage is three programs: - [houradm: install and maintain](https://houradvantage.com/docs/reference/cli/houradm.md): Make the admin password hash and the secret key the server reads at startup. On Windows, houradm also installs the server as a service (the Deploying page of the docs covers it under "Windows... - [hourctl: actions and jobs](https://houradvantage.com/docs/reference/cli/hourctl-actions.md): Ask a device to do something, follow or cancel what it was asked, or run one action over many devices in waves (a job). - [hourctl attend: Time and Attendance](https://houradvantage.com/docs/reference/cli/hourctl-attend.md): Hour Advantage Time and Attendance, on an instance that runs it: read people's ledgers and the facts they are worked out from, record corrections and other facts, see who waits to be worked out... - [hourctl: devices](https://houradvantage.com/docs/reference/cli/hourctl-devices.md): The device register: find devices, let them in or keep them out, and key and label them. - [hourctl: packages](https://houradvantage.com/docs/reference/cli/hourctl-packages.md): Build, test, render and replay protocol and policy packages on this machine, offline, against a packages folder (pkg build, pkg test, pkg render, pkg replay); push the bundles to a running server... - [hourctl: listeners, endpoints, sinks and routes](https://houradvantage.com/docs/reference/cli/hourctl-routing.md): Set up where devices connect (listeners), which package reads them (endpoints), where their events go (sinks), and where people's punches go (routes), and route the punches that go nowhere yet. - [hourctl: setup and status](https://houradvantage.com/docs/reference/cli/hourctl-setup.md): See how the server is doing, manage its tenants, export and apply a tenant's setup (or the install's, with --install) as a file, compare two clusters and promote packages and setup from one to the... - [hourctl: sync groups](https://houradvantage.com/docs/reference/cli/hourctl-sync.md): List, create and change sync groups: their members, placement rules, people, rows and settings. - [hourctl: watching](https://houradvantage.com/docs/reference/cli/hourctl-watching.md): Read stored events, post events as another system does, read failed device messages, set the log level, read the device messages an instance has in hand, and watch what happens on every instance,... - [hourd: the server](https://houradvantage.com/docs/reference/cli/hourd.md): Run the server (Hour Advantage Connect, and Time and Attendance where enabled), check that it answers, and run the development gateway that serves the packages in a folder as they are on disk.... - [Events](https://houradvantage.com/docs/reference/events.md): What an event looks like: the envelope, ids, order and delivery, sinks and pulling, posted events, times, biometric data, and every event type with its fields and an example. - [Event schemas](https://houradvantage.com/docs/reference/schemas.md): Every event is an envelope whose data is described by the schema named after its type. Each schema is a JSON Schema (draft 2020-12), and every event the gateway emits matches the schema of its... - [access.changed](https://houradvantage.com/docs/reference/schemas/access-changed.md): Sent by the gateway for a sync group that keeps the access domain: one of its rows (a schedule, holiday, access group or zone) was added, changed or deleted, through the admin API or taken in from... - [action.result](https://houradvantage.com/docs/reference/schemas/action-result.md): The gateway's own event: an action (an ordered group of commands, its steps, for one device) finished. The gateway emits it once per action, with the change that finished it (the change is never... - [biometric](https://houradvantage.com/docs/reference/schemas/biometric.md): A biometric template a user has on the device: a fingerprint, face, palm or finger vein, in the form the setbiometric action takes back. Emitted by zk-push (2.0, 2.4 and 3.4) when the clock... - [biometric.attestation](https://houradvantage.com/docs/reference/schemas/biometric-attestation.md): A user's answer to the device's biometric consent question. Emitted by zk-push 3.4 when the clock uploads a consent record, which it does after the user answers the question at the device. Not... - [biometric.deleted](https://houradvantage.com/docs/reference/schemas/biometric-deleted.md): Templates of a user were deleted on the device: one template (kind and index given), every template of a kind (kind only), or all of the user's templates (neither). Emitted by zk-push (2.0, 2.4... - [biometric.photo](https://houradvantage.com/docs/reference/schemas/biometric-photo.md): The photo a user's face or palm template was enrolled from. Emitted by zk-push 2.4 when the clock uploads it: after an enrolment at the device, or in answer to queryusers or queryuser. Biometric... - [biometric.refused](https://houradvantage.com/docs/reference/schemas/biometric-refused.md): The gateway's own event: a device sent templates or photos (biometric, biometric.photo or user.photo events) of a person whose sync group does not allow them biometrics (allowbiometrics is false).... - [clock.restamped](https://houradvantage.com/docs/reference/schemas/clock-restamped.md): Time and Attendance: sent when an operator re-stamps a clock's punches (POST .../clocks/{id}/restamp): the clock's punches from an instant on were given the clock's record as it is now (its... - [clock.shifted](https://houradvantage.com/docs/reference/schemas/clock-shifted.md): Time and Attendance: sent when an operator shifts a clock's punches (POST .../clocks/{id}/shift): the clock's punches made from an instant up to another were each moved by a number of seconds (or,... - [command.result](https://houradvantage.com/docs/reference/schemas/command-result.md): The gateway's own event: a device answered a command. The gateway emits one for each answer to a command it still has open, as the device's package reads it from the device's message; a repeated... - [command.unanswered](https://houradvantage.com/docs/reference/schemas/command-unanswered.md): The gateway's own event: a command handed to a device was lost. The gateway emits it once per command, and the step goes unanswered, which fails its action (action.result). A command is lost when... - [device.back](https://houradvantage.com/docs/reference/schemas/device-back.md): The gateway's own event: a device came back after an absence longer than its endpoint's backafterminutes. It is told once per return, when the device is let in again. Nothing looks for absences: a... - [device.blocked](https://houradvantage.com/docs/reference/schemas/device-blocked.md): The gateway's own event: a device that was allowed or waiting to be allowed was blocked (PATCH /api/tenants/{tenant}/devices/{endpoint}/{device} with status blocked, ctl device block). The gateway... - [device.clock_ahead](https://houradvantage.com/docs/reference/schemas/device-clock_ahead.md): The gateway's own event: a device was first seen with its clock set ahead, because a punch it sent was made more than toleranceseconds after the moment it reached the gateway. It is told once,... - [device.clock_behind](https://houradvantage.com/docs/reference/schemas/device-clock_behind.md): The gateway's own event: a device was first seen with its clock behind, because the punches of its uploads, as the endpoint's zone placed them, were made more than toleranceseconds before they... - [device.error](https://houradvantage.com/docs/reference/schemas/device-error.md): Something the device could not do with what it was sent (a command, or data it was given), as the device reports it in its error log. Emitted by zk-push 2.4, one per error row the clock uploads. - [device.held](https://houradvantage.com/docs/reference/schemas/device-held.md): The gateway's own event: a gate step of an action did not pass (the device's answer failed it, or it went unanswered), so the device is held. Nothing more is handed to the device, on any lane,... - [device.joined](https://houradvantage.com/docs/reference/schemas/device-joined.md): The gateway's own event: a device joined its tenant and its endpoint's sync group. It is told when the device is allowed for the first time: registered as allowed, allowed after waiting (PATCH... - [device.log](https://houradvantage.com/docs/reference/schemas/device-log.md): A row of the device's own operation log: power, menu use, enrolments, deletes, settings, alarms, door events. Emitted by zk-push (2.0, 2.4 and 3.4), one per row of the operation log the clock... - [device.moved](https://houradvantage.com/docs/reference/schemas/device-moved.md): The gateway's own event: an allowed device moved to another sync group, because its endpoint's group was changed (its syncgroup set, changed or taken away). It is told once for each allowed device... - [device.new](https://houradvantage.com/docs/reference/schemas/device-new.md): The gateway's own event: a device the gateway did not know contacted an endpoint and registered itself. The gateway emits it once, when it adds the device to its register: allowed when the... - [device.options](https://houradvantage.com/docs/reference/schemas/device-options.md): Options read from the device, named as the device names them. Emitted by zk-push 2.4 when the clock answers the getoptions command (beside the command's command.result, whose result carries the... - [device.released](https://houradvantage.com/docs/reference/schemas/device-released.md): The gateway's own event: a held device (device.held) was released by hand (POST /api/tenants/{tenant}/devices/{endpoint}/{device}/release, ctl device release). The gateway emits it once per... - [device.set_aside.expired](https://houradvantage.com/docs/reference/schemas/device-set_aside-expired.md): The gateway's own event: MQTT messages of a device, set aside because what they waited for could take long (the device waiting to be allowed, registered or to present its key, its package failing... - [envelope](https://houradvantage.com/docs/reference/schemas/envelope.md): Every event, whatever its type. data is described by the schema named after type (punch.json, user.json, ...). Consumers must ignore fields they do not know: fields are added within a schema version. - [exception.raised](https://houradvantage.com/docs/reference/schemas/exception-raised.md): Something someone has to look at in a person's time: a missing punch, a value not allowed, or what a policy step names (late, a no-show). Sent when it first appears in the person's ledger, and... - [exception.resolved](https://houradvantage.com/docs/reference/schemas/exception-resolved.md): An exception exception.raised told of no longer needs looking at: it is gone (a correction, a punch that arrived, or a change of setup put it right), or someone excused it (it stands, accepted as... - [id_card](https://houradvantage.com/docs/reference/schemas/id_card.md): A national identity card read at the device's card reader. Emitted by zk-push 2.4 when the clock uploads the card it read. Every field is passed on as the device sent it, as text, and is "" when... - [inventory.extra_user](https://houradvantage.com/docs/reference/schemas/inventory-extra_user.md): Sent by the gateway for a sync group that keeps people: a clock reported a user it still carries from a group it left (a clock that moved), and that this group does not hold. The user is not the... - [job.cancelled](https://houradvantage.com/docs/reference/schemas/job-cancelled.md): A job was cancelled. The gateway sends it when a running or paused job is cancelled (POST /api/tenants/{tenant}/jobs/{id}/cancel). Devices that had not started are cancelled with it; the actions... - [job.completed](https://houradvantage.com/docs/reference/schemas/job-completed.md): A job is over. The gateway sends it when every device of a running or paused job has finished (succeeded, failed, timed out or been cancelled). POST /api/tenants/{tenant}/jobs/{id}/retry-failed... - [job.execution.cancelled](https://houradvantage.com/docs/reference/schemas/job-execution-cancelled.md): A job's device was cancelled. The gateway sends it when the job is cancelled before the device started, or when the device's action ended cancelled (the job was cancelled while it ran, or the... - [job.execution.failed](https://houradvantage.com/docs/reference/schemas/job-execution-failed.md): A job's device failed. The gateway sends it when the device's action failed (a step failed or went unanswered), could not be started, or is no longer kept, or when the device is held (its action... - [job.execution.started](https://houradvantage.com/docs/reference/schemas/job-execution-started.md): A job started a device. The gateway sends it when the job takes the device (its wave has started, maxconcurrent leaves room and its window is open), just before it starts the device's action.... - [job.execution.succeeded](https://houradvantage.com/docs/reference/schemas/job-execution-succeeded.md): A job's device succeeded. The gateway sends it when the device's action finished with every step done. Envelope: endpoint and device are the device's, package is "houradvantage-connect". Sent once... - [job.execution.timed_out](https://houradvantage.com/docs/reference/schemas/job-execution-timed_out.md): A job's device ran out of time. The gateway sends it when the device's action did not finish within the job's timeout (counted from when the action was started; one hour unless the job says): the... - [job.paused](https://houradvantage.com/docs/reference/schemas/job-paused.md): A job was paused. The gateway sends it when a running job is paused by hand (POST /api/tenants/{tenant}/jobs/{id}/pause) or by its abort threshold; reason says which. While the job is paused no... - [job.resumed](https://houradvantage.com/docs/reference/schemas/job-resumed.md): A job runs again. The gateway sends it when a paused job is resumed (POST /api/tenants/{tenant}/jobs/{id}/resume), or when POST /api/tenants/{tenant}/jobs/{id}/retry-failed takes the failed and... - [job.started](https://houradvantage.com/docs/reference/schemas/job-started.md): A job was created. The gateway sends it once, when the job is created (POST /api/tenants/{tenant}/jobs), before any device starts: state is running, wave is 0 and every device is queued. A job... - [job.wave](https://houradvantage.com/docs/reference/schemas/job-wave.md): A job moved on to a later wave. The gateway sends it when every device of the current wave succeeded and the rollout advances by itself (advance "auto", the default), or when the job is told to... - [leave.booked](https://houradvantage.com/docs/reference/schemas/leave-booked.md): What a leave request books changed while where it stands did not: a day of leave on a holiday added after the leave was approved books no time (the hours are back in the balance and the holiday is... - [leave.cancelled](https://houradvantage.com/docs/reference/schemas/leave-cancelled.md): A leave request is taken back (cancelled), and no other replaces it: its time is no longer in the person's ledger. A request replaced by another is not cancelled: the other is requested in its... - [leave.decided](https://houradvantage.com/docs/reference/schemas/leave-decided.md): A leave request is approved at every stage (its time is now in the person's ledger, in its category), rejected at a stage, or refused by the policy's leave check (not enough balance, a blackout... - [leave.requested](https://houradvantage.com/docs/reference/schemas/leave-requested.md): A leave request waits for a stage's approval: for whoever approves that stage to act on. Sent when the request is made, again at each stage after the one before approves it, and again when a... - [list.changed](https://houradvantage.com/docs/reference/schemas/list-changed.md): Sent by the gateway for a sync group that keeps the lists domain: one of its items (a work code, job code, tip code or message) was added, changed or deleted, through the admin API or taken in... - [package.held](https://houradvantage.com/docs/reference/schemas/package-held.md): Time and Attendance: sent to a tenant following a shared package when a published version needs something the tenant has not set up (an accrual category or a measure the version reads). The tenant... - [package.updated](https://houradvantage.com/docs/reference/schemas/package-updated.md): Sent when a change makes a tenant take another version of a policy package: publishing a version of a shared package that a tenant following its major version takes from now on (one event to each... - [period.adjusted](https://houradvantage.com/docs/reference/schemas/period-adjusted.md): The adjustments a timecard holds for a closed pay period are new or changed: changes recorded after that period closed (a late punch, a correction, a setup or policy change naming a day in it),... - [period.closed](https://houradvantage.com/docs/reference/schemas/period-closed.md): A pay period is closed for a person: their timecard as payroll pays it, with its totals. Sent once per close; a change recorded after the close shows as an adjustment, not a new period.closed.... - [person.changed](https://houradvantage.com/docs/reference/schemas/person-changed.md): Sent by the gateway for a sync group that keeps people: a person in the group's registry was added or changed, through the admin API or taken in from a member device. Each change sends one event:... - [person.deleted](https://houradvantage.com/docs/reference/schemas/person-deleted.md): Sent by the gateway for a sync group that keeps people: a person was deleted from the group's registry, through the admin API or taken in from a member device. The person and their credentials are... - [person.enrolled](https://houradvantage.com/docs/reference/schemas/person-enrolled.md): Sent by the gateway for a sync group that keeps people: a person was enrolled at a clock (the clock reported a user the group did not have). They are the group's person from then on, with what the... - [person.linked](https://houradvantage.com/docs/reference/schemas/person-linked.md): An unlinked person was linked to the person they are (or unlinked, or linked to someone else): from the link on, their punches are that person's. Carries both ids and the sender's ids, so a sink... - [person.replaced](https://houradvantage.com/docs/reference/schemas/person-replaced.md): Sent by the gateway for a sync group, once: a person's user id change (POST /api/tenants/{tenant}/sync/{name}/people/{userid}/change-id) is done on every member. Each member that held the person... - [person.unlinked_seen](https://houradvantage.com/docs/reference/schemas/person-unlinked_seen.md): Punches arrived for someone the tenant does not know: their sender knows them by its own ids only (Connect's id of the person, or the user on an endpoint), with no id of the tenant's among them.... - [photo](https://houradvantage.com/docs/reference/schemas/photo.md): A photo the device took when someone tried to punch, uploaded by the device (zk-push 2.0, 2.4 and 3.4: the ATTPHOTO table). It is personal data: the gateway drops it before it is stored unless the... - [policy.hook_failed](https://houradvantage.com/docs/reference/schemas/policy-hook_failed.md): The gateway's own event: an endpoint's policy package hook failed (its code raised an error, ran out of its limits, or returned what a hook may not), or said to do what could not be done (an... - [punch](https://houradvantage.com/docs/reference/schemas/punch.md): A user punched in or out at a device. Sent by the device's package for every attendance record the device uploads (zk-push 2.0, 2.4 and 3.4: each ATTLOG line; brightlink-cloud: each punch... - [punch.unrouted](https://houradvantage.com/docs/reference/schemas/punch-unrouted.md): The gateway's own event: a punch of a person of a group that keeps people goes nowhere until it is routed (the site's /docs/policy/ page, Routes). The punch itself was stored as a punch event as... - [recalculation.parked](https://houradvantage.com/docs/reference/schemas/recalculation-parked.md): The attendance engine parked something it could not work out, saying why (reason): it is not tried again by the clock, only when something it is worked out from changes, or when a worker of... - [setting.changed](https://houradvantage.com/docs/reference/schemas/setting-changed.md): Sent by the gateway for a sync group that keeps the settings domain: one setting's value was set or cleared, for one settings class or for the standard setting names (class ""), through the admin... - [sink.behind](https://houradvantage.com/docs/reference/schemas/sink-behind.md): Sent when a sink falls behind retention: it has not taken events older than retentiondays (counted in whole UTC days). Such events are never removed for their age: they are kept until the sink... - [sink.caught_up](https://houradvantage.com/docs/reference/schemas/sink-caught_up.md): Sent once when a sink that was behind retention (sink.behind) no longer is: it has taken every event older than retentiondays, or an operator moved it past them (sink.moved). Checked every hour;... - [sink.moved](https://houradvantage.com/docs/reference/schemas/sink-moved.md): Sent when an operator moves a sink by hand (POST .../sinks/{id}/position): back, to have it sent events again, or ahead, skipping what it has not taken. Moving a sink ahead is the only way an... - [sync.member](https://houradvantage.com/docs/reference/schemas/sync-member.md): Sent by the gateway for a sync group when one of its member devices changes standing: it joined or left the group, the bulk-delete guard paused it, it was resumed, its package now declares... - [sync.paused](https://houradvantage.com/docs/reference/schemas/sync-paused.md): Sent by the gateway for a sync group: the bulk-delete guard paused a member device. It reported that it cleared its users or its data (a datacleared, userscleared or factoryreset in its log, not... - [tenant.limit_reached](https://houradvantage.com/docs/reference/schemas/tenant-limit_reached.md): Sent by the gateway when a tenant is found over one of its limits with nothing refused for it: people (the people its sync groups keep, all together, past limits.people). A write through the API... - [timecard.approved](https://houradvantage.com/docs/reference/schemas/timecard-approved.md): A person's timecard for a pay period is approved at every stage its approval rule has: as a whole, or, where its side is approved by assignment, every assignment's hours of it. Sent once; a change... - [unparsed](https://houradvantage.com/docs/reference/schemas/unparsed.md): A record the package could not interpret, passed on as the device sent it instead of being dropped: the device was told it was received and will not send it again. zk-push 2.0, 2.4 and 3.4 send it... - [user](https://houradvantage.com/docs/reference/schemas/user.md): A user record on the device, uploaded when the user is added or changed on the device, or on request (zk-push 2.0, 2.4 and 3.4: USER rows, for instance in answer to queryuser). A changed record is... - [user.deleted](https://houradvantage.com/docs/reference/schemas/user-deleted.md): A user was deleted on the device, at its menu or by a command. zk-push 2.0, 2.4 and 3.4 send it for each user-deleted row of the device's operation log (alongside that row's device.log event),... - [user.extended](https://houradvantage.com/docs/reference/schemas/user-extended.md): A user's extended verification settings, uploaded by the device when they change or on request (zk-push 2.4 and 3.4: USEREXTINFO rows; zk-push 2.4 also in answer to queryuserextended). - [user.photo](https://houradvantage.com/docs/reference/schemas/user-photo.md): A user's enrolment (display) photo, uploaded by the device when it is added or changed, or on request (zk-push 2.0, 2.4 and 3.4: USERPIC rows). It is personal data: the gateway drops it before it... - [work_code](https://houradvantage.com/docs/reference/schemas/work_code.md): A work code the device holds: one of the codes a user can enter with a punch (punch's workcode). Emitted by zk-push 2.4, one per code, when the clock uploads its work codes in answer to... - [Security](https://houradvantage.com/docs/security.md): How Connect protects secrets and limits what it reaches: sealed secrets and changing the key, addresses a tenant may reach, trusted roots, device keys, the audit trail, request ids, idempotency keys, connection limits and signed deliveries. - [Selectors](https://houradvantage.com/docs/selectors.md): The selector language both engines share. It picks devices and people by labels in Connect, and people by attributes and place in hierarchies in Time and Attendance's eligibility rules. - [Sync groups](https://houradvantage.com/docs/sync.md): A sync group keeps the same data on a set of clocks, whatever their vendor: people and credentials, access schedules, lists, settings and recent punches. It covers who decides the data, which people go to which clocks, and how to set one up. - [Sync group reference](https://houradvantage.com/docs/sync/reference.md): Every sync group setting, row kind and field, row state, punch mark, zone field, limit, API route, hourctl command and event, in tables to scan. - [Tenants](https://houradvantage.com/docs/tenants.md): One install can serve many customers, called tenants. Each tenant keeps its own setup and events, and no tenant can see another's. This page covers setting up, suspending and deleting a tenant, events, tokens, retention and limits.