Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

The following feature is new in Ignition version 8.0.3
Click here to check out the other new features
This function is used in Python Scripting.

Description

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.

Syntax

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 = system.date.parse("2019-07-01 17:00:00")
end = system.date.parse("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
user.addScheduleAdjustments([scheduleAdjustment])

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

system user createScheduleAdjustment, user.createScheduleAdjustment

  • No labels