14 day schedule

Hi All,

I use BigFix only for running the IBM License Metric Tool. So I have no experience with scripting custom fixlets or tasks.

We have thousand of servers we need to scan and we have them divided by groups. Prod servers can only be scanned at night or on weekends. We are able to squeeze all necessary scans into a two week cycle without overloading anything. However BigFix “reapply this action” doesn’t allow for a 14 day schedule. It is either 7 days which is too short or 15 days which becomes three weeks if a scan needs to be run on a certain day of the week. Three weeks is too long. BigFix support confirmed that there is no 14 day option out of the box.

Is there any kind of workaround that can be done by somebody who does not know how to customize fixlets? As of now we have to create single run schedules manually which is very time consuming and error prone. And honestly I find it more than lacking that a scheduling software doesn’t allow for more flexible scheduling. I already created a enhancement request, but even if approved this will take along time before it will be available.

What is your workaround to achieve a 14 day schedule?
Thank you!

Please upvote my enhancement request - thank you!
https://connections-ideas.hcltechsw.com/ideas/IDEACNCTNS-I-2152

Hello
There is a method, it’s a little messy and does involved editing the scan fillets…
What you can do is create a client settings - these have date stamps. Then add some relevance to the Fixlet that checks the age of this setting and becomes relevant when older than 14 days.
e.g.
In the Fixlet, add this line

setting “14D_Test_Last_Executed” = “{now}” on “{now}” for client

Then, in the Fixlet relevance add this clause

not (exists setting “14D_Test_Last_Executed” whose (exists value whose ((now - it as time)<14*day) of it) of client)

When you take the action set it to reapply whenever it becomes relevant again - this will be if the client setting is not there, or was last set more than 14 days ago.
Note: I tested this with a 2 minute interval by changing the relevance to <2*minute - it’s not going to be very accurate with such a short period but days should be ok!
David

Thank you I will give this a try.

I like that, but I’d propose another method as well. Instead of configuring a client setting, we can look at the action’s last execution time.

not exists action whose (now - last active time of it < 14 * day )

When this relevance is evaluate on a Fixlet, it’s always true - because ‘action’ doesn’t exist. But when it’s evaluated as an Action, it evaluates to ‘True’ at first (when ‘last active time’ doesn’t exist), and then toggles to False until 14 days pass. After 14 days, it’s ‘True’ again.

Send it as an Action, with the “Reapply whenever it becomes relevant again” option and it re-executes every 14 days after the first run.

3 Likes

This sounds like an interesting option because it uses the existing “last active time”.

Thank you!

Sadly the action doesn’t repeat when I put this into the box that is in the applicability tab of the action.
I click the “… the following relevance clause evaluated to true.” and replace the word “true” with the string you gave me {not exists action whose (now - last active time of it < 14 * day )}.
As I said I have zero experience with fixlet programming or relevance language. It tried looking it up but it doesn’t look like a skill you can conquer in a couple of hours. I only needs this to run the required actions for the IBM License manager on two week schedule.
Maybe it is something simple - thank you for any further help you can provde.

When I add this line
setting “14D_Test_Last_Executed” = “{now}” on “{now}” for client"
into the action script It fails. Is there a specific place I need to put this?

Can you post what your “Action Settings” dialog looks like? This screen…

And also, the original Applicability tab shouldn’t have just been ‘true’…there’s a big relevance clause in there by default, so I wonder if I’m looking at the wrong fixlet…which fixlet/task are you running?

I am running a copy of the “Initiate Software Scan”. And the applicability tab looks like this

But you are right the original fixlet has that long clause in there you are showing. We never run the original. We were told by the previous admin to always run from a copy. Looks like when we create the copy the simple true statement is in there.

The execution tab looks like this.

Where would I put 14D_Test_Last_Executed” = “{now}” on “{now}” for client?

Ok…and for what you put into the Applicability, for the 14-day repeat…it should not have the curly brackets, right?

Even if a copy of Initiate Software Scan is used, the original relevance conditions should be retained as they do some useful checks such as : A scan is not already running, the client is not set with CIT_Deny to prevent scans to run, Catalog exists etc

@gsummerer - I agree with @ssakunala that you need the additional checks from the source Task to properly run the software scans. Find Task 2: Initiate Software Scan (9.2.24.0) and click on the [Copy] button in the toolbar in the Details pane. Then apply one of the two solutions provided as below.

@TivoliDave’s solution uses a client setting to store the start time, and so this line

setting "14D_Test_Last_Executed" = "{now}" on "{now}" for client

is inserted at the beginning of the code on the Actions tab of the Create Task dialog for your custom copy of the Initiate Software Scan task. This will insure it doesn’t interfere with any of the OOB code that comes with the copy.


Note:

You may have encountered an issue with copying text from the forum which included “smart” quotes. The script engine and relevance interpreters don’t recognize these characters as quotes.

When proper quotes are used, in the Action script, quoted text strings are shown in a red font. While strings surrounded by curly braces { ... } will be displayed in a purplish color.


You would create a new relevance clause on the Relevance tab of the Create Task dialog after the last OOB clause by clicking the [+] button to its right. Enter the applicability relevance from @TivoliDave’s solution:

not (exists setting "14D_Test_Last_Executed" whose (exists value whose ((now - it as time)<14*day) of it) of client)

Then click the [OK] button to store the copy of the Task, with these modifications, in the Master Action Site.

@JasonWalker’s solution is a bit less work to implement, and, to me, is a bit more elegant, as it uses data derived from the operation of BigFix itself.

You don’t need to modify the Action Script in this case, merely add Jason’s applicability relevance as a new clause to the Relevance tab of your copy of the Initiate Software Scan task. As before, just click the [+] button to the right of the last OOB clause, and enter the following:

not exists action whose (now - last active time of it < 14 * day )

and click on the [OK] button to store the copy of the Task in your custom site (or master action site).

In either case, after you’ve created your custom copy, you can then Take Action and target the Computers that need to be scanned on a 14 day interval.

I hope this helps you figure out the way forward. I’m happy to assist you further if you’re interested.

2 Likes

@itsmpro92 Thank you for detailed instructions. I was able to follow them and tested with a 10 minute repeat. It looks like it worked. I will now test with a 1 day repeat cycle and the move to 14 days.

2 Likes

I’m glad you found them to be useful.

Happy that this seems to be sorted now @gsummerer - come back in 2 weeks to let us know that it’s working as expected!

A big “Thank You” to all who contributed to this topic. It indeed works and I am now able to schedule my actions to repeat on a 14 day schedule. It is a great relief to not have to schedule this manually anymore.

1 Like