We have one robot that does a foreground process (A) on a schedule, but lets say we also want it to run another foreground process (B) to work whenever things land in a queue (i.e. set up a trigger on that queue) - we don’t care if the the user of (B) has to wait sometimes for (A) if it happens to be running.
(1) Work out that (A) is running and is foreground process, and so schedule the process (B) behind it, if its triggered … i,e. it creates a new job but in pending state.
(2) Starts a job for process (B) the moment it is triggered by an incoming queue item, but then errors that job with ‘Bot fails due to a foreground process already running’ because (A) is still running.
If (2) what is the best way to go about achieving my ambition with a single robot?