Skip to main content

system.kanoa.schedule.getCalendarEvents

Syntax

getCalendarEvents(paramsDict)

Parameters:
  • paramsDict (dict): Dictionary containing calendar event parameters.

  • Returns:
  • scheduleData (dataset): Dataset of calendar schedule events.
  • Dictionary

    ParameterTypeRequiredNotes
    scheduleTypestring'shift' or 'operation'
    startDatedatetimeStart of the date range
    endDatedatetimeEnd of the date range
    assetPathstringAsset path to filter schedule data
    activeEventsOnlyboolUsed when looking for the current shift or operation schedule only
    tzOffsetsdictTimezone offset data for proper calendar alignment

    Code Examples

    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'
    tzOffsets = {'Pacific Standard Time': {startOffsetMins': -480, 'endOffSetMins': -480}}
    scheduleData = system.kanoa.schedule.getCalendarEvents({'scheduleType': 'shift', 'startDate': startDate, 'endDate': endDate, 'assetPath': assetPath, 'tzOffsets': tzOffsets})