I don't recommend Steve's comment "For example, you can process records with a next due date that is less than or equal today." Far too complicated. I recommend that in the Organization setting for the PM to always use
zero (0) days forward
and to only select Active PM's, then to assign in each PM the
Lead to be the actual number of days in advance for the targetted start dates (this gives you lots of flex), and then to have the PMWoGenCronTask to run once a day.
You (if needed) to have multiple instances of the PMWoGenCronTask. Each running at different times to distribute the load. You will need to ensure that the
instance_pm_sqlwhere does not have PM's crossing over each other i.e. Area A, Area B, Area A + B, Area C, in this instance having Area A + B is bad, though noting other comments, even if you do, you will not generate the PM twice. It loads up the server.
------------------------------
===============================
Craig Kokay,
Lead Senior Maximo/IoT Consultant
ISW
Sydney, NSW, Australia
Ph: 0411-682-040
=================================
#IBMChampion2021
------------------------------
Original Message:
Sent: Wed May 19, 2021 08:42 AM
From: Steve Hauptman
Subject: Logic behind scheduled PMs?
There is no "order" to generating the PMs. A couple of things to keep in mind:
- Each route stop will become a work order and each task of the associated job plans will become a work order. That means you are creating 40k work orders for the route stops alone. Add 10 tasks each and that will be over 400k.
- In the organization app, you can use a where clause to filter which get processed. For example, you can process records with a next due date that is less than or equal today.
There is no parallel processing out of the box, and having two identical instances of the cron task running can cause problems. However, it is possible to set up multiple users such that each user has access to a non-overlapping subset of the PMs (say by site or some other indicator - which could be a custom field such as the user name). You can then set the run-as-user field of a series of instances to be each of those users and therefore safely run in parallel.
------------------------------
Steve Hauptman
Original Message:
Sent: Tue May 18, 2021 10:08 AM
From: User1971
Subject: Logic behind scheduled PMs?
For reference, here's the query that I used:
(and Craig Kokay provided an alternative query here.)
--p = source is parent WO records--pm = source is PM records--c = source is child WO recordsselect to_char(p.reportdate, 'MONTH DD') as p_reportdate_day, p.wonum as p_wonum, p.pmnum as p_pmnum, p.route as p_route, p.reportdate as p_reportdate,-- pm.pmcounter as pm_counter, pm.targstarttime as pm_targstarttime,-- pm.nextdate as pm_nextdate, c.parent as c_parent, c.pmnum as c_pmnum, c.route as c_route, c.wo_count as c_wo_count, c.min_reportdate as c_min_reportdate, c.max_reportdate as c_max_reportdate, c.processing_time_hrs as c_processing_time_hrsfrom (select * from maximo.workorder where pmnum like 'BC%' and reportedby = 'MAXADMIN' and istask = 0) pleft join maximo.pm pm on p.pmnum = pm.pmnum left join ( select parent as parent, pmnum as pmnum, route as route, max(reportedby) as max_reportedby, count(*) as wo_count, min(reportdate) as min_reportdate, max(reportdate) as max_reportdate, round((max(reportdate) - min(reportdate)) * 24,1) as processing_time_hrs from maximo.workorder group by parent, pmnum, route, changeby order by min_reportdate desc ) c on p.wonum = c.parentorder by p.reportdate desc
Original Message:
Sent: Tue May 18, 2021 09:26 AM
From: User1971
Subject: Logic behind scheduled PMs?
MAM 7.6.1.2:
I'm trying to understand the how scheduled PMs work in Maximo.
- For testing purposes, I have PMs scheduled for each hour of the day that generate large WO hierarchies.



I have a query that I'm using to analyze the PMs and their resulting WOs:
p = source is parent WO records
pm = source is PM records
c = source is child WO records
I've made some observations based on that query:
1. The PMs are run one-at-at-time; the PMs don't run simultaneously.- If we look at columns C_MIN_REPORTDATE and C_MAX_REPORTDATE, then we can see that the PMs are run in a sequence: from 12:33 AM to 3:19 AM, 3:20 AM to 5:46 AM, 5:47 AM to 7:55 AM, etc.
2. The PMs don't run in any sort of intuitive order. I would have thought they would run in order of Target Start Time. But that's not the case.- Refer to the PM_TARGETSTARTTIME field in the query.
3. Maximo isn't able to keep up with the PMs in this test. It ought to be creating twenty-four WO hierarchies each day -- one for each PM. But it runs out of time each day and only ends up generating 10-15 WO hierarchies, not 24 WO hierarchies.- With that said, this test is extreme. I wouldn't normally be generating this many WOs per day from PMs. But it is useful for testing purposes, nonetheless.
- The test tells me: if Maximo isn't able to generate all the PMs / WO hierarchies that were scheduled for the day, then it simply gives up on the ones it missed and moves on to the PMs that are scheduled for the next day.
4. When I originally created the PMs, the Estimated Next Due Date field was the same for all twenty-four PMs. However, as mentioned in # 3, Maximo wasn't able to keep up, and the Estimated Next Due Dates quickly became out-of-sync for each of the PMs. Question:I'm new to PMs. I've likely misunderstood some of the things I observed above.Would someone be able to provide some insight about the logic behind PMs?Thanks.
#Maximo
#AssetandFacilitiesManagement