Stopping the pending Unattended Bot during specific hours

We have a scenario that I haven’t been able to find an answer to in the community forum. We have 5 unattended bots running on the same server. They are processing transactions in a specific application. That application goes down for maintenance from 10pm to 11:30pm every night. We ran into a scenario where we had a significant number of jobs not resolved by 10pm. We are not currently using Queues nor calendars.

What we wanted to do was to hit the orchestrator API to toggle the bot status to essentially turn off the bots but maintain the pending work prior to 10pm, then at 11:45 hit the API again to toggle the status on and let the bots continue.

We ran into a problem in that the time between jobs was so small the API couldn’t toggle the status unless it hit the API when the bot was in a “ready or available” state.

How have you accomplished the scenario where we need to send bot actions throughout the day to orchestrator, these jobs might take days and days to complete; and during that time we have an application that the unattended bot uses go into maintenance or “down” and the bot fails. If we were to not do anything, all the bots processed between 10pm and 11:30pm would show as a failure because that application was down.