How Work Orders Are Generated
A Recurring or Condition template doesn't create work orders by itself. A Kanoa gateway timer does, and knowing how it works explains why a work order can appear a little after it's due, and what to check when one never appears.
The CMMS Schedule Timer
Kanoa runs a gateway timer called CMMS Schedule, about once a minute. Each run does two things, in this order:
system.kanoa.cmms.checkWorkOrderSchedule()creates the work orders that are due from Recurring templates, including the ones inside each template's Generate Ahead window.system.kanoa.cmms.checkWorkOrderConditions()creates the work orders whose Condition has been met: run hours, counts or tag values.
You don't need a timer script of your own for either. The timer runs only:
- on the active gateway, if you have a redundant pair;
- while Kanoa Maintenance is licensed, or its trial is running;
- while Enable Kanoa Maintenance is on, under Configuration → Application → Settings.
It checks the last two before every run, so it starts again by itself once the license or the setting is back.
The Kanoa gateway config page has a Timers tab, where you can turn the CMMS Schedule timer off or give it another interval. A saved interval stays after a restart.
Run It by Hand When Testing
While you're building templates, you don't have to wait for the timer. Run either check yourself and see how many work orders it created.
-
Open the Script Console in the Designer.
-
Run:
created = system.kanoa.cmms.checkWorkOrderSchedule()print 'Recurring work orders created:', createdcreated = system.kanoa.cmms.checkWorkOrderConditions()print 'Condition work orders created:', created -
If either prints more than 0, open Maintenance → Work Orders and find the new work orders.
Both functions sweep every template, the same as the timer does, so running them by hand is safe. A work order that's already been created isn't created twice.
When a Work Order Doesn't Appear
Check these, in order:
- Is the template Released? Draft templates are never scheduled.
- Is Enable Kanoa Maintenance on, and is the license (or trial) active?
- Is the CMMS Schedule timer on, on the Timers tab?
- For a Recurring template: is the next occurrence inside its Generate Ahead window yet?
- For a Condition template: has the asset really passed the threshold since Last serviced on? Run hours only count while it's running.
Then run the checks by hand, as above, and see whether they create it.
You now know what turns a template into work orders, and how to test it without waiting.