How to suspend one job and execute another job with a single Unattended license then resume it again automatically?

Hi All,
We have a strange situation with one of our clients. We had developed a process (Update AD user expiry date based on the details fetched from a ticketing tool) and deployed it in production.

Now client wants to do an enhancement : Client doesn’t want us to schedule the process. The above process needs to be triggered whenever a Ticket Mail is available in local outlook. Bot needs to monitor the mailbox 24/7 and trigger the actual process if there is mail. Continue the mail box monitoring otherwise. They don’t want us to touch the existing process and Mail trigger enhancement needs to be done with a separate process. How can I achieve this with only 1 unattended license?

We have a lot of restrictions, not to run PS scripts, bat files etc. Need to achieve this completely based on UiPath capabilities. Can any one help me for a solution?


I was hesitant to share this with you because i do not Feel like its a good solution…

But i have managed a similar problem.
We used the licens to monitor e-mail 24/7 - if an e-mail was found we invoked SecondProcess. When process was completed the original process rettens to monitor e-mail again :slight_smile:

Not sure if it helps but let me know :slight_smile:


We can give a try on to call a process 2 (Update AD user) from process 1 (Mail monitoring process).

We have an activity called Start Job that can be used for that when the started process do not have input arguments, if it does than API call also be used for that.


Hi @JDK - Thank you for the response. When we invoke the 2nd process, wouldn’t it run as part of the same job? We already informed client it’s possible to run as 2 jobs without realizing the difficulties, I was thinking background process will work. But background process consumes a separate license in unattended mode. Client is hanging on the information we shared :confused: Shouldn’t have done that.

Hi @chaitanya.kulkarni - When we use Start Job, it will go to Pending State because your Mail Process Job is still running and license is occupied. Unfortunately we have only 1 runtime license allocated to us.

Yes it Will. Unless the workflow you invoke is build correctly. We are able to log to processes within one process. The robot doing this has been running for almost 6 months now. 24/7. :slight_smile:

1 Like

As @chaitanya.kulkarni mentioned you can call Start Job for the second process as soon as you have some email to process.

So, if you have:
A - mail monitor
B - executor

(A) runs in an infinite loop to check the mailbox, once an email arrives you call Start Job (B) and then you Terminate (A). Then (B) will be able to start and once it completes the run, in the very end you call Start Job (A), so the (A) will again start and run until the next email arrives.

This is kind of juggling, but given your constraints, it might be something you could use.

The only missing part here is to make sure that if A or B crashes the cycle will be able to recover somehow.


That was actually a good idea. Thanks

Thank you guys for the replies. I will update the solution here once I get response from client side.

1 Like

Actually, Terminate activity is not needed, since you just need to break out of the infinite loop when an email arrives and the workflow will normally finish.

1 Like