Skip to main content

system.kanoa.schedule.getCalendarEvents

Description

New function that attempts to service both operations and shift schedule Gets all events in the specified range. Applies the site time zone to the dates, in order for the dates to show correctly on the calendar component

Syntax

getCalendarEvents(paramsDict)
  • Parameters
      paramsDict (dict)
      scheduleType (string): 'shift' or 'operation'
      startDate (datetime)
      endDate (datetime)
      assetPath (string)
      activeEventsOnly (bool): used when looking for the current shift or operation schedule only
  • Returns
      scheduleData (dataset)
  • Code Example

    # Example Usage:
    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})