Recurring tasks

I’m looking for advice on the proper way to create a task that will repeat every night based on the existence of a file.

What I need to do: Reboot all computers nightly where a particular file exists…this particular files gets created/deleted all day long, but if it still exists come midnight then something is wrong and I need to reboot the machine. This action will run every night at midnight.

Scenario 1: Do I create a task where the relevance checks for the existence of the file, and then the action simply reboots? The problem I see with this is when I “take action”, not all of the computers may be relevant at that moment. So even if I set the action to reapply when relevant, won’t it only reapply to the computers that were originally relevant?

  • or -

Scenario 2: Or do I create a task where the relevance always returns ALL the computers, and the action script uses an IF statement to determine if the file exists and if the computer should restart. And then simply reapply the action every night. That way every single computer gets the action every night, but the action script filters out those that do not apply.

Any input would be greatly appreciated. Thanks.

This understanding is correct if you are targeting specific computers . If you are targeting dynamically by property then whenever a computer becomes relevant for the action, it is now targeted by the action.

My recommendation would be to dynamically target the group of computers you are checking and then either specify the time part in the action itself or specify it in relevance.

Does that help?

I think I understand. My relevance only checks for the existence of a file, and not for specific computers.

So when I take action on Monday, and only 30 of 100 computers are relevant, and I schedule this to repeat / reapply when applicable. Then on Tuesday night when 60 of the 100 computers are relevant, then the action will detect those new machines and apply the action to all 60 and not just the original 30?


If when you action the fixlet you use, “Dynamically target by property” on the selection screen then yes, it will work that way.

If you use, “Select Devices” on the selection screen then it will only ever apply to the selected devices.

1 Like

Nice. That makes sense. Thank you.

1 Like