Relevance for a 90 day reboot

I currently use relevance for monthly reboot based on a day.

Ex.
current date = first Saturday of current month_and_year + 7 * day

This will essentially reboot a system on the Saturday of the month in the example below. But I have need for a 90 day reboot on a specific day but not sure how to write the relevance for that.

Any suggestions?

If I understand correctly you want the following:

The Action will be relevant for the machine if the uptime is 90 days or higher
If the Action will be relevant, it will be executed on a specific day of the Week
Do you wish it will start also between specific hours?
Do you want it to restart immediately?

What logic is needed?

  • “If uptime is greater than 90 days, reboot on the first Saturday of the month”?
  • “Reboot on the first Saturday of every third month”?

How would you explain the goal to another person?

Basically reboot 90 days from last reboot on first Saturday

Would this work as detection logic for the reboot fixlet?

(uptime of operating system >= 90 * day) and ((it = first saturday of month_and_year of it) of current date)

3 Likes

That looks like it will work.

Does that mean would following Saturdays such as second and third will follow this logic?

(uptime of operating system >= 90 * day) and ((it = first saturday +7 *day of month_and_year of it) of current date) 2nd

(uptime of operating system >= 90 * day) and ((it = first saturday +14 *day of month_and_year of it) of current date) 3rd

That would be how I beleive it would function, though the relevance systax you have is slightly wrong. I changed my system date to Sat 13th 2024 to run this

Q: current date
A: Sat, 13 Jan 2024
T: 6.522 ms
I: singular date

Q: (uptime of operating system >= 90 * day) and ((it = first saturday of month_and_year of it +7 *day) of current date)
A: True
T: 6.485 ms
I: singular boolean
3 Likes

Thank you for your help with this, I can never get relevance right.