DoAutoShiftChanges Method
- Last UpdatedNov 06, 2025
- 1 minute read
The DoAutoShiftChanges() method performs an automatic shift change on all entities that can schedule shifts.
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
The current time of the database on the Middleware server is used.
The shifts from the Shift_To_Go table are read to determine if shifts are due to be started or ended for an entity.
- If a shift start time is in the past, but ends in the future time, then those shifts are started for an entity, and then the shifts for all its descendant entities that do not have their own shift schedule are started.
- If the shift end time is before the current time or the shift start is in the future, the shift is ended for the entity and all it descendent entities that do not have their own shift schedule.
Note that this method does not calculate the schedule for any entities; it uses the existing data in the Shift_To_Go table. This table is populated by the DoDailyTasks() method.