I need to set condition in reframework. The bot should start by every 11.30am and stop by next day 5.30am. based on the condition the should go to end process.
Already I have set one condition in reframework if there is no data bot should not stop and execute initialisation stage to run process again instead of end process. Because bot should execute time 5.30am.
And I’m manually stopping the bot by 5.30am everyday
Coud you share your use case for bot need to continue running even no more data to be process ?
You can set the Schedule for job end execution directly in trigger settings:
Stop option will end the execution after the end of time set up when the bot try to get new item to process. Before verify if has data to process, it will check if received Should Stop command from orchestrator.
Kill option will kill the job imediatly, no matter the part of the code it running
You can use both in a combination to give time to bot stop and if not stop after x time, you kill the job
I have needed something similar in a process. I set an exit time of 7:30am, and then after each iteration checked DateTime.Now against my exit time. If the time now is more than the exit time, then it throws a specific error type and then the job stops:
If you add 1 day, the job will try to stop in the next day at 11:30 (1 day from start execution)
So if you want a specific hour, you need to calculate the hours from start execution (trigger) until the desired hour you want to end the execution
To make sure your job will stop, add a time for “Schedule automatic “kill”, if the job does not stop” option.
The job only stop using STOP COMMAND when robot goes to “Get Transaction Data” and use Check Stop Signal Activity. So if you job entering in a loop or stuck in Process State, it not be able to finished the execution. The Kill option will kill the job after x time after try to stop it first