This article will look at how employees can automatically be prevented from clocking if they work too many days in a row. We’ll setup up a method of tracking consecutive working days in Jarrison Time, and then use it to check if the person has worked too many days consecutively, if they have they’ll be deactivated and their templates will be removed from devices. This article assumes direct control of devices.
The condition for this example will be 6 days consecutively worked, after which the employee should not be able to continue clocking. This solution requires Jarrison Time to have direct control of devices.
To start with, a new time category will need to be added from Setup > Time Categories. Note that we’ll be using this time category as a counter, instead of an actual counter, because the Restriction setting used later requires a time category to check.
In this example we’ve called the new time category “Consecutive Days Worked”. The category can be marked Is a Running Total to keep the total correct if the consecutive count runs into the next period.

Next, some formulas need to be added on the day programs that are part of the shift pattern(s) where consecutive days need to be tracked and deactivations should be applied.
From Setup > Day Program select an applicable Day Program for worked days and go to the Rules tab, where the following formulas need to be added:
line 1: checks if Present counter = 1 (the person was at work on this day), if so then add 1 to yesterday‘s “Consecutive Days Worked” value, storing it as “Consecutive Days Worked”. We are adding 1 hour to count as a day worked, and this “counter” will increase value as more days in a row are worked.


line 2: checks if Present counter = 0 (the person was not at work), if they’re not at work then the consecutive count can reset to 0 as the consecutive streak has been broken.
Note that both lines must be marked to Post Process, in order to use the Present counter after it’s been incremented.
Non-working days that are part of the shift pattern must also have a formula added, to bring across the value of “Consecutive Days Worked” to the next working day. This is done by assigning yesterday’s “Consecutive Days Worked” value to today’s “Consecutive Days Worked” on all non-working days.

After setting up all the above, the Consecutive Days Worked column can be added to the Daily Summary View, and results checked.

We can see the person worked consecutively from the 1st until the 9th of the month. They didn’t work Saturday or Sunday as those aren’t working days, but the count was carried across to resume in the next week. They didn’t work on the 10th, and this caused the counter reset to occur.
After the above has been setup, the shift pattern restriction can be applied from Setup > Shift Pattern, Restrictions tab.
Click Add Restriction, and then enter a value for Deactivate the employee if they have worked more than. This would be the number of consecutive days worked after which they should be deactivated.
Select the time category the consecutive days are being tracked in next, and then select in the current period, or in last days (number can be adjusted).

You can select to Email the employee supervisor or another address in the case of a deactivation, in this example an email address has been added.
The JT Engine will check for the conditions of Shift Restrictions being met at the end of each day, and after a restart.
After a deactivation has taken place, the Employee Profile Enrollment tab will reflect their status, and the Active box will no longer be ticked.

The system will not automatically re-activate the profile, a user will need to send deactivated profiles back to device(s).