Skip to main content

system.kanoa.cmms.checkWorkOrderSchedule()

This function runs periodically to see if we are ready to generate a workOrder event based on schedule. Evaluates all configured time-based (calendar/interval) work order schedules to determine whether any are due, and generates new work order records for the ones that are ready. Like checkWorkOrderConditions, Kanoa runs this itself about once a minute, on the CMMS Schedule gateway timer, so you don't need a timer script of your own. Call it by hand when testing a Recurring template; each run sweeps every active schedule. It takes no arguments; the schedules it evaluates are the ones already configured in the CMMS (see the scheduleTypeId/scheduleTypeName filters on getWorkOrders).


Parameters​

None


Returns​

ordersGenerated Integer


Example​

ordersGenerated = system.kanoa.cmms.checkWorkOrderSchedule()