Hi Kurk,
You are right, job update is not allowed while job is in STARTING/RESTART state.
But the update will be successful once the job moves to FAILURE/SUCCESS/TERMINATED/RUNNING etc states.
You can use a simple bash shell script below to attempt updating the job with global variable in a loop.
The job update will be successful once the job moves out of STARTING/RESTART state. i.e. once the job moves to FAILURE after max retries.
Below script keep trying to update the job every 1 second in a loop of 1000.
Script exits once the job update is successful or loop of 1000 completes.
Thanks
Venkat D (Broadcom Engineering)
Sample script below. You may want change the job name, global variable name, loop count etc.
=========================
#! /bin/bash
for i in {1..1000}; do
echo "update_job: jobA condition: v(GBL1)=1 and notrunning(jobA)"|jil
if [ $? -eq 0 ]; then
echo "*Job updated successfully*"
exit 0
else
echo "****Attempting to update the job again***"
sleep 1
fi
done