This function is used in Python Scripting.


Creates a schedule adjustment.

Client Permission Restrictions

Permission Type: User Management

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.


system.user.createScheduleAdjustment(startDate, endDate, isAvailable, note )

  • Parameters

Date startDate The starting date of the schedule adjustment.

Date endDate  - The ending date of the schedule adjustment.

Boolean isAvailable  - True if the user is available during this schedule adjustment.

String note  - A note about the schedule adjustment.

  • Returns

Schedule Adjustment - A ScheduleAdjustment object that can be added to a user.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet - Creating Schedule Adjustment
# Specify the range of the schedule change.
start ="2019-07-01 17:00:00")
end ="2019-07-05 17:00:00")

# Create an adjusted schedule.
scheduleAdjustment = system.user.createScheduleAdjustment(start, end, True, "Summer swing schedule change.") 

# Get the user we need to adjust.
user = system.user.getUser("default", "george")

# Apply the adjusted schedule to the temporary user that lives in this script.

# Override the old george user in the user source, with the new user we created in this script.
system.user.editUser("default", user)

system user createScheduleAdjustment, user.createScheduleAdjustment