my file exists, however my action still waits 3 seconds. I want the pause to only last until one of the conditions becomes true (either the time limit is reached or the file exists)
parameter “startTime”="{now}"
pause while { (now-time(parameter “startTime”) < 3*second) or (not exists file whose ((name of it = “SQLServiceAccountChangeScriptOutput_” & (computer name) & “.txt”) AND exists lines whose (it contains “BigFix:DONE”) of it) of folder “c:\logs”) }
if {(not exists file whose ((name of it = “SQLServiceAccountChangeScriptOutput_” & (computer name) & “.txt”) AND exists lines whose (it contains “BigFix:DONE”) of it) of folder “c:\logs”)}
parameter “startTime”="{now}"
pause while { (now-time(parameter “startTime”) < 3*second) or (not exists file whose ((name of it = “SQLServiceAccountChangeScriptOutput_” & (computer name) & “.txt”) AND exists lines whose (it contains “BigFix:DONE”) of it) of folder “c:\logs”) }
I used a 3second timeframe for this example, but my real fixlet uses 30minutes. In your example, if the file doesn’t exist, it will wait 30 minutes. If the file is created after the 30 minute timer starts, the client will still wait 30 minutes.
This is closer, but I want the pause to stop once the file exists, or the times hits the goal.
if it’s AND, won’t both constraints need to be true (ie the time must be 3 and the file must exist)?
You might be thinking about it in reverse. Pause While will continue to pause while the relevance evaluates to true. Once the statement evaluates to false, the process continues.
Consider the situation where the time elapsed is less than 3 seconds, but the file now exists:
Pause While
the time is less than 3 seconds (evaluates to true)
OR
the file does not exist (evaluates to false)
This evaluates to
Pause While true OR false
, which means that the process will pause until both values evaluate to false.
Pause While true AND false
will pause until one of the values evaluates to false (true AND false = false).