--- title: "system.user.getSchedule" description: "Returns a specific schedule." --- # system.user.getSchedule > Returns a specific schedule. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.user.getSchedule(scheduleName)` ### Parameters |Type | Parameter | Description| |------- | ------- | ------| |String | `scheduleName` | The name of the schedule to return. Case-sensitive| ### Returns **ScheduleModel** - The schedule, which can be a [BasicScheduleModel](https://sdk.inductiveautomation.com/javadoc/ignition81/latest/com/inductiveautomation/ignition/common/user/schedule/BasicScheduleModel.html) object, [CompositeScheduleModel](https://sdk.inductiveautomation.com/javadoc/ignition81/latest/com/inductiveautomation/ignition/common/user/schedule/CompositeScheduleModel.html) object, or another type registered by a module. If a schedule was not found, the function will return None if called from a Vision Client or the Designer. if called in from a Perspective Session or anywhere else in the Gateway scope, will throw an IllegalArgumentException. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Example #1" # This example will get a schedule and print info about it. # This function handles recursive printing of the different schedule types. Modules can register more types than listed here. def printScheduleInfo(aSchedule): if aSchedule.getType() == "basic schedule": print "Basic schedule type: ",aSchedule.getName(), aSchedule.getDescription(), aSchedule.isAllDays(), aSchedule.isObserveHolidays() elif aSchedule.getType() == "composite schedule": compositePieces = aSchedule.getModels() print "Composite schedule type:",aSchedule.getName(), aSchedule.getDescription(), " which is made up of..." for piece in compositePieces: printScheduleInfo(piece) else: print "Other schedule type: ", aSchedule.getName(), aSchedule.getDescription(), aSchedule.getType(), aSchedule.isObserveHolidays() # The main function. scheduleName = "MySchedule" schedule = system.user.getSchedule(scheduleName) if schedule == None: print "Schedule", scheduleName, "was not found" else: printScheduleInfo(schedule) """The example above outputs the following: Basic schedule type: MySchedule A description False True""" ```