(imported topic written by DrSonnyNnamchi)
Folks,
Problem:
We have a known issue within BigFix at a customer that a scheduled “Custom Take Action” expected to run between 4:00AM and 6:00AM in the morning , also set to be reapplied indefinitely (in this case a reboot) on hosts at a particular time (Say 4:00AM) every day or after a 24-hour of last Action seems to “creep” because it is using the actual restart time or last time the system was rebooted to make a prediction of when it should be executed, thus we were seeing the reboot executed several forward times within the interval like at 4:06AM / 4:13AM / 4:21AM etc until the “Run Between” Upper Limit is ( say 6:00AM) is eventually exceeded (Thus the creep issue). The Action continues to run after this upper interval is exceeded. and this was unacceptable. A simple schedule to perform the reboot at a particular time of the day, everyday was not possible within BigFix using its default custom take Action settings.
Fix:
Applicability relevance scripting was used to successfully get the needed reboot to execute within the acceptable time interval (such as 4:00AM and 4:10AM), thus making it run the action script ( of rebootaction) ONLY within the time interval (say 4:00AM to 4:15AM) of “Relevance”, but it checks that the system has been up for more than 8mins (uptime of operating system) as part of relevance evaluation and that the time interval is within the specified time prior to taking the reboot action.
Here is the Applicability script:
(uptime of operating system as string > “
00:08:00
”) AND (((preceding text of last “:” of (substring separated by " " whose (it contains “:”) of (now as string))) >= “
0
4:00
”) AND ((preceding text of last “:” of (substring separated by " " whose (it contains “:”) of (now as string))) <= “
0
4:09
”))
I hope this helps someone out there.
Sonny N