Weekly computer reboot relevance

(imported topic written by asantalucia91)

We are trying to institute a weekly workstation (non-server) and are having some issues with creating the proper relevance.

Below is our current relevance:

(value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry = “WinNT”) AND (name of operating system = “WinXP”) AND (((now - boot time of operating system) / day) as string >=“07”)

We are having issues with the: (((now - boot time of operating system) / day) as string >=“07”)

Some computers are reporting as relevant even though they were booted less then 7 days ago. Have a machine that was booted 1 day ago and it shows relevant in BigFix.

Can anyone help with this?

Thanks, Alex S.

(imported comment written by SystemAdmin)

Alex,

I think the problem is caused because you are doing a string comparison which will use ascii to compare “07” against the result. Ascii comparison is probably right most of the time but it isn’t doing what you want. Try this instead which just does time comparison:

(((now - boot time of operating system) / day) >= 7 * day)

(imported comment written by asantalucia91)

That did not fix it either. Actually taking out the as string did not return a True or False. Any other ideas?

(imported comment written by asantalucia91)

This is what I get:

Q: (((now - boot time of operating system) / day) >= 7 * day

E: This expression could not be parsed.

(imported comment written by jessewk)

You have an extra parenthesis.

Try: ((now - boot time of operating system) / day) >= 7 * day

(imported comment written by SystemAdmin)

err, don’t need the 7*day…

((now - boot time of operating system) / day) >= 7

(imported comment written by koi9991)

I have used this relevance for weekly reboot, but the STATUS said Not Relevent. I have gone through the article#196. It doesn’t help on my case.

Please help!

(imported comment written by jessewk)

Did you try running the query in the relevance debugger on the machine in question?

It sounds like you targeted the machine but it hadn’t been up for 7 days yet. If the action is still open when the machine has been up for 7 days, it will become relevant and take the action.

(imported comment written by BES_Suresh91)

Below is the relevance that worked for us:

value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry = “WinNT”) AND (name of operating system = “WinXP”) AND ((now - boot time of operating system) / day) >= 7