Skip to content

Publish timesheet norms

Publishes the weekly work time norm and holidays for each employee so the timesheet calendar always has data for the next ~13 weeks.

How it works

Each employee’s weekly work time norm (expected working minutes per day) and holiday list are calculated in advance and stored, so the timesheet can show them without recalculating on every page load. This job moves the last published week forward, one week at a time:

  1. Picks employees — active or pending employees whose published weeks do not yet reach ~13 weeks ahead
  2. Calculates a week — for each missing week, works out the norm and holidays from the employee’s current employment terms and work time policy
  3. Saves the weeks together — one record per employee holds every newly calculated week
  4. Skips unchanged weeks — when a week’s values are identical to what was previously published, it is left out (the job still moves on past it)

On any day but Monday, the target week has not moved since the previous day, so every active employee is already up to date and the job does no work — by design.

When it runs

The job runs every day. How long it takes depends on how many employees are behind — normally only those who had a terms or policy change in the last 24 hours.

Parameters

ParameterDescription
ForcePublish every week again for every active or pending employee, including weeks that did not change. Use this when the timesheet shows norms or holidays that do not match the configured terms and policies

Job results

MetricDescription
processedNumber of employees the job acted on
emittedNumber of weeks published
candidatesNumber of employees the job looked at
skippedEmployees the job could not process (load errors)
forceWhether the run used the Force parameter

When to use Force

  • After a major change to work time policies that should also apply to past weeks
  • When the timesheet calendar appears to show wrong norms or missing holidays for active or pending employees
  • After restoring a backup or running a migration that touched terms or policies

Force publishes weeks again across the full range (from the start of each employee’s open timesheet statement, or the start of last month, up to ~13 weeks ahead). Expect the run to take longer than a normal run.

Troubleshooting

IssueSolution
Wrong norm shown on a future weekVerify the employment terms and work time policy for that employee give the expected value. Run with Force to publish again
Holidays missing on the calendarCheck the holiday calendar that covers the employee. Run with Force to refresh
New employee has no calendar dataActive and pending employees are picked up automatically on the next run. To bring an employee in immediately, run the job