How to get the Run count every day of the bot

I Have a bot that runs at 9AM, 11AM, 1PM, 3PM and 5PM,
and have setup the trigger accordingly.

After each run i want to send an email saying

“1st run was success” for 9AM trigger
“2nd run was success” for 11AM trigger

“5th run was success” for 5PM trigger.

How can i keep that counter increasing for each run. Next day it should reset and start from 1.

Hi!

There are several ways, you could have an asset which you increment after each successful run.
Orchestrator - About Assets (uipath.com)
You could use the orchestrator api’s to get the jobs that have run and count those.
Orchestrator - Jobs Requests (uipath.com)

1 Like

I have 2 options for you
1.Use Queue
2.Use Excel

1 Like

@hansen_Lobo

No counter or asset or anything is needed

Based on the time you can decide which run it is anduse 1 to 5 numbers

Cheers

Another method would be to use a dispatcher bot for this with persistence activities , it gives you a bit more freedom on determining how the jobs went. (Activities - Activities)

Simply start the job with Start Job And Get Reference and use Wait For Job and Resume to detect if it was succesfull or not. Then send out your email, sleep until next trigger with Resume After Delay and then repeat.

1 Like