Skip to main content
Nintex Community Menu Bar
Solved

Script between time range


Forum|alt.badge.img+1

I have this Botflow.

 

That needs to execute some tasks.

those tasks can only be executed before 8PM or after 1AM everyday.

 

how can I script this in Nintex RPA LE.

 

So if time is between 8PM and 1AM do nothing.

Before 8PM & After 1AM can execute tasks.

 

Hope someone can help me.

 

With regards, 

Jim

Best answer by nicknep

Hi Jim,

 

This is something I’ve done a few times before. I’ve worked with several financial institutions who’s software goes offline overnight.

 

My technique is to implement an while loop, evaluating the current time. If we’re outside of the time range, the script can continue. I’m using military time to account for AM/PM. I’d recommend running this task for each data record the script is processing.

 

One additional thing to consider, before exiting the loop you may want to unlock the machine, or re-login to any needed apps.

 

See below for a quick example, and let me know if you have any questions!

 

Thanks,

Nick

View original
Translate
Did this topic help you find an answer to your question?

3 replies

MRepetti
Nintex Employee
Forum|alt.badge.img+9
  • Nintex Employee
  • 24 replies
  • August 1, 2024

Hello @Suprianaj, I think if you use an If action that pulls the system time in military format and tell the Bot to execute the actions in the If action between 8 pm and 1 am, this will work for you.

Then you put an End Task or End All Tasks action within the If and End If action. Alternatively, if you look in the Flow menu on the left of the Bot, you will see other actions toward the bottom under Navigation that may suit your needs better to help the Bot to jump to the end of the botflow without processing any of the other actions. I had a sample botflow but I cannot attach it so please see my screenshots attached. 

Please let me know if you have any questions. 

Translate

Forum|alt.badge.img+1
  • Novice
  • 3 replies
  • Answer
  • August 1, 2024

Hi Jim,

 

This is something I’ve done a few times before. I’ve worked with several financial institutions who’s software goes offline overnight.

 

My technique is to implement an while loop, evaluating the current time. If we’re outside of the time range, the script can continue. I’m using military time to account for AM/PM. I’d recommend running this task for each data record the script is processing.

 

One additional thing to consider, before exiting the loop you may want to unlock the machine, or re-login to any needed apps.

 

See below for a quick example, and let me know if you have any questions!

 

Thanks,

Nick

Translate

Forum|alt.badge.img+1
  • Author
  • Rookie
  • 4 replies
  • August 1, 2024

Thank you Nick & Michelle, 

Both solution works like a charm. 

Thank you so much for your quick help and assistance.

With regards, 

Jim

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings