Skip to main content

system.kanoa.schedule.getCalendarEvents(paramsDict)

Gets all operations schedule or shift events for the specified range. Applies an offset to the returned dates to show correctly on the calendar component. paramsDict keys are optional unloess otherwise stated.


Parameters

paramsDict Dictionary

- activeEventsOnlyBooleanUsed when looking for the current shift or operation schedule only
- assetPathString
- endDateDateTimeRequired
- scheduleTypeStringRequired. Type can be shift or operation
- startDateDateTimeRequired
- tzOffsetsDictionaryCan be passed in to improve performance. {"Pacific Standard Time": {"startOffsetMins": 480, "endOffSetMins": 480}}

Returns

scheduleData pyDataset


Example

startDate = system.date.parse("2025-01-01 00:00:00")
endDate = system.date.parse("2025-01-07 00:00:00")
assetPath = 'Kanoa Industries\Adelaide Hills\Packaging\Line 1'
scheduleData = system.kanoa.schedule.getCalendarEvents({'scheduleType': 'shift', 'startDate': startDate, 'endDate': endDate, 'assetPath': assetPath})