I am trying to build a task which will prompt for how many hours to lock a client for using the “action lock until”
By default clients are unlocked
I have a task:
action parameter query “_hours_wait” with description "Lock the system for how many hours [hh]"
action lock until “{now + (parameter “_hours_wait”*hours)}” on “{parameter “action issue date” of action}” for client
I have a syntax error in the lock syntax, any help would be appreciated.
Command failed (Relevance substitution failed) action lock until “{now + (parameter “_hours_wait”*hours)}” on “{parameter “action issue date” of action}” for client (action:118186)
The goal is to support scheduling the task to run starting at a particular day/time and the task would handle how long the lock needed to be applied and unlock on its own.
I have done this with separate scheduled tasks to lock, and unlock but inevitably systems are unlocked that should not be, and some are left locked.
Not quite - i am using Bigfix server 9.5.14 and client 9.5.14 on Windows 2016 (if it helps)
Command succeeded action parameter query “_hours_wait” with description “Lock the system for how many hours [hh]” (action:118195)
Command failed (Relevance substitution failed) action lock until “{(now as string) as time + (parameter “_hours_wait” as integer) * hour}” “{parameter “action issue date” of action}” for client (action:118195)
At 13:42:46 -0400 -
I went so far as copying the syntax from the man page directly and it failed the too
I have a 9.5.14 on suse.
The example in the doc fails also in my env, apparently for the final ‘s’ in ‘day(s)’. It works removing the ‘s’:
action lock until "{now + 3*day}" "{now}"
I tried again also the entire command; probably the problem in my env was hour(s); it could also be that when copying the text from the forum some character remained dirty. Try to copy and paste this one:
action lock until "{now + (parameter "_hours_wait" as integer) * hour}" "{parameter "action issue date" of action}" for client
Check that the " (quotes) are not changed in " or " (open-close quotes) during paste.