Hello, I want to run two tasks, one after the other but I cannot use automation as task 1 should run every day at specific time. Also task 1 runs against some targets and task 2 against other targets.
Task 2 will run only if task one has completed minutes or hours before (never days).
is there a relevance that I can use on the second task that says something like
if action name “task/action 1” run today and it is completed, then true else false?
Just an idea… have you tried to use the action 1 to create a flag file in your endpoints at the end of its intended actions, and action 2 would read if the file exists, if yes, then its finished, if not then its not yet, therefore not relevant.
We are using this type of flag files to check if data collected for health checks are new or not (using 3rd party collectors that BigFix deploy).
Hello Thank you, I tried that however I am facing a problem
Task 1 runs against 89 servers, task 2 against only 1
However we only need the task to succeed on 1 in order for the second task to run…
the key here is…how do I know that the task for the 89 finished (regardless of how many success or failures I have).
Will I not run the risk of the action becoming relevant after the success of the first target, hence starting the second, when in fact the other 88 servers have not finish yet.
bare in mind that the 89 targets will all be writing/applying something to the flag, but just with one success the flag will be mark.
Hello Jason, I did and I think I got it…more test will be required but I will keep you posted.
What I did was
In task 1, added the server that is required in Task 2 in the relevance so that it becomes a target
Add a condition to task 1…
parameter “serverstodo” = "{Computer Name}"
if {parameter “serverstodo” != “serverfortask2”}
do the work on the 89 servers
endif
if {parameter “serverstodo” = “serverfortask2”}
setting “Count_Send_Email”=“true” on “{now}” for client
endif
I then created a property with the relevance
if exists settings “Count_Send_Email” whose(“true” = value of it) of client then true else false
Once that it was done I created an action for task 2 that only runs if the property Count_Send_Email is true for the only server that is the target