Allocating OFF clock punches (type 2)

This clock type identifies when an employee punches out at the end of their workday or leaves for a break.

Processing is affected by these values:

  • Registry parameters in system/WORKBRAIN_PARAMETERS/:
    • MAX_ON_TIME (HRS)
    • OFF_CLK_ADJ_MIN (MINS)
    • CLOCK_TYPES_FOR_MAX_ON_TIME
    • SCHEDULE_MAX_LOOK_BACK_DAYS
  • system/clockprocessing/CONSIDER_WORK_SUMMARY_OVERRIDES registry parameter

OFF clock processing performs more checks and comparisons than ON clock processing, because it is more oriented to the employee's schedule. Scheduling data that can alter OFF clock processing can come from the Labor Forecasting and Scheduler Optimization (LFSO) module and schedule detail overrides.

When beginning to process an OFF clock punch, a search for the Most Recently Processed (MRP) clock that can be paired with the new OFF clock is performed. If a clock punch is found, this MRP clock is then tested to determine if the OFF clock can be associated with the MRP clock. First, the type of the MRP clock must be included in the CLOCK_TYPES_FOR_MAX_ON_TIME registry parameter. If this parameter is blank, all clock types are eligible. Second, the value of the MAX_ON_TIME (unit in hours) registry parameter is added to the MRP clock. If the OFF clock falls before or on this time (MRP clock + MAX_ON_TIME), then the OFF clock is associated with the MRP clock and placed on the same work summary as that clock.

Note: If the CONSIDER_WORK_SUMMARY_OVERRIDES registry parameter is set to true, then manual clocks generated as a result of work summary overrides are also considered when determining the employee's most recent clock. Clocks outside of the range defined by the MAX_ON_TIME parameter are ignored. Only manual clocks with a timestamp before or equal to the incoming actual clock are considered. Manual clocks timestamped after the incoming clock are ignored. By default, the CONSIDER_WORK_SUMMARY_OVERRIDES registry parameter is set to false (manual clock overrides are not considered).

If the OFF clock cannot be associated with the MRP clock, the employee's schedule is checked. This process determines the work summary to which the clock is added.

These steps describe the process:

  1. The value of the OFF_CLK_ADJ_MIN registry parameter is added to the OFF clock.
  2. The day of the OFF clock punch, the day before, and the day after are checked for schedule information. If schedules for these days are found, the next phase of calculations is started. If no schedule is found for any of those days (for example, the employee is scheduled OFF), the value of the SCHEDULE_MAX_LOOK_BACK_DAYS registry parameter is used to find a schedule. This schedule is used as a template for the day without a schedule. If a schedule within the time frame, as determined by the SCHEDULE_MAX_LOOK_BACK_DAYS parameter, is found, that schedule is used for the day without a schedule in the next calculations.
  3. The difference between the scheduled end time and the time of the OFF clock for those three days is determined. The OFF clock is placed on the day with the smallest positive difference. All differences are given a positive value regardless of whether the OFF clock falls before or after the scheduled off time. If no schedule can be found for a day, the day is assigned a value of -1, which prevents the association with the OFF clock, except in the case where no schedule can be found for any of the days. If there is a tie, this order is used to allocate the clock: the day of the clock, the day before, and the day after.
  4. If no schedules are found for these three days, after looking back the number of days that is specified in the SCHEDULE_MAX_LOOK_BACK_DAYS parameter, the OFF clock is placed on the day that is associated with the clock punch.