Home      KBase      Ask a Question      My Stuff      Help   
  
Scripting - Rounding Times to a Set Schedule ("Roundtoschedule")
We can round to a specific schedule by using the "Roundtoschedule" script. This is done by setting up the shift in the Employee Setup 'Rounding Schedule' field and then entering the minute increments you want to round up/down to the scheduled in/out time for your script.

You will enter the employee's schedule in the "Rounding Schedule" field in Employee Setup. The schedule should be entered in the following format:

In time - Out time

for example:

7:00am - 4:30pm

The Roundtoschedule rule will look at that schedule and round the IN and/or OUT punch based on the schedule times and the parameters in the script. This is explained in detail below:

Roundtoschedule(a1,a2,b1,b2);

a1 This is the number of minutes prior to shift that we are rounding to the scheduled start time (i.e. if they are early).
a2 This is the number of minutes after the start of the shift that we round back to the start time (i.e. if they are late).
b1 This is the number of minutes after the end of shift that we are rounding to the end time (i.e. if they leave late).
b2 This is the number of minutes prior to the end of the shift that we are rounding to end time (i.e. if they leave early).

As an example: Roundtoschedule(0,5,0,15);

The above means that:

0 = number of minutes prior to shift that we are rounding to the scheduled start time (i.e. if they are early). Since it is "0" we will not be rounding this time.
5 = This is the number of minutes after the start of the shift that we round back to the start time (i.e. if they are late). Which is 5 minutes.
0 = This is the number of minutes after the end of shift that we are rounding to the end time (i.e. if they leave late). Since it is "0" we will not be rounding this time.
15 = This is the number of minutes prior to the end of the shift that we are rounding to end time (i.e. if they leave early). Which is 15 minutes.

Any of the variables can be left as 0 but there has to be something in that field so that the system recognizes the command.

Also please note that if you include midnight as part of the schedule for your employee (either the in or out punch times) this will not work as the system cannot run the rule at the same time as a day change over. You would be able to run it off of either 11:59pm or 12:01am though.

NOTE: In TW this can be used up to 11 hours or set to 660 (minutes) in other words. In TWP the limit is 2 hours or 120 (minutes).


Scripting (Main Page) > Scripting - Rounding Times to a Set Schedule ("Roundtoschedule")
ID
243
Category
<Unassigned>
Date Created
5/5/2008 12:07:03 PM
Date Updated
8/15/2017 1:08:31 PM
Was this information helpful?
 
Back to Search Results