Stop Robot outside working hours

Hi There,

I updated a condition under the Get Transaction Data to set the Transaction Item to Nothing as follows: (The idea is to Stop the Performer from executing outside business hours)

ShouldStop OrElse (Date.Now.Hour < 7 OrElse Date.Now.Hour >= 19)

Am wondering if specifying the time in 24 Format works all the time or does it depend on how the Orchestrator ist setup ? Appreciate your inputs

Thank you
Hara

According to MS documentation, Hour property will always return number from 0 to 23, so a 24-hour format.

Please note that this has nothing to do with Orchestrator setup, as this expression is evaluated on machine where bot executes, so it’s local time from that machine.

1 Like

Hi @Hara_Gopal

In the DateTime expressions if you give this Date.Now.Hour expression it will give the 24 hours format for sure.

It was not depend on the Orchestrator or any other reason.

You given the correct expression no need to change anything.

Hope it helps!!

1 Like