How to use analysis as fixlet property

Hi ,

I have one analysis which provide the WindowStart time value . Ex : below .

Q: last 4 of (“0000” & ((it / 60) as string & last 2 of (“00” & ((it mod 60) as string))) of (first 2 of it as integer * 60 + last 2 of it as integer - 10) of it) of ((value “WindowStart” of it as string) of key “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot” of native registry) as string
A: 0740
T: 757

I want to use this analysis as my relevance condition checking ? Is that possible way around ?

Ex: if my fixlet looks the time 0740 , then my Fixlet mark the client as applicable .

1 Like

Basically analysis has to be a fixlet relevance condition checking . Possible ?

First you nees to be able to convert it into a true/false result by comparing it against local time. Do you want it to be true only for one minute (in this example, “at 7:40 am”? More likely you want to start being relevant at 0740 and stay relevant for some duration - one hour? Two hours?

Once you have that decided, I’d recommend making a Global Property. Then you don’t need to add it to fixlet relevance, instead when you take an Action you set the properties to “Run only when … MaintenanceWindow…is true”.

In fact, if you check in the console you’ll find there’s already a Maintenance Window Wizard that does much of this for you, and a search for “Maintenance Window” in this forum should give you a lot of tips as well.

2 Likes

Waww. yes . Great . Logic is correct . But then I tried , I got a follow .

Q: last 4 of (“0000” & ((it / 60) as string & last 2 of (“00” & ((it mod 60) as string))) of (first 2 of it as integer * 60 + last 2 of it as integer - 10) of it) of ((value “WindowStart” of it as string) of key “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot” of native registry) as string
A: 0100
T: 871

Q: ((two digit hour of it & “:” & two digit minute of it) of current time_of_day)
A: 01:06
T: 747

After comparison of less then , it’s coming as True . It’s suppose to come as “False” … why it’s shows “True”

Q: if (((two digit hour of it & “:” & two digit minute of it) of current time_of_day) > (last 4 of (“0000” & ((it / 60) as string & last 2 of (“00” & ((it mod 60) as string))) of (first 2 of it as integer * 60 + last 2 of it as integer - 10) of it) of ((value “WindowStart” of it as string) of key “HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot” of native registry) as string)) then “True” else “False”
A: True
T: 64410

Q:

Win_Test

1 Like

Jason , I found it :slight_smile:

((two digit hour of it & “:” & two digit minute of it) of current time_of_day) ,

I have to remove : from code

((two digit hour of it & “” & two digit minute of it) of current time_of_day)

It looks , it will work , I am going for testing now :slight_smile:

1 Like

Working as expected . Good learning Jason. Thanks for your time .

1 Like