Job Scheduler with cron expressions

I have an RPA job that need to run between 6am and 10pm every day every 15 minutes. Other RPA solutions have let me use a cron expression, but I have been unable to see this option in PEGA.

I really don’t want to have to create 64 job schedulers… is there another way to do this?

@PhilipG1165 If you are using Pega Robot Manager, your work will get done by your bots once that work is added to the work queue. If you want Runtime to startup, do something, then shut down, and then repeat this every fifteen minutes, you might consider an alternate approach. You might want to code this into your automation to run on startup and then sleep for fifteen minutes (or sleep until a specific time). This would take the responsibility of scheduling off of your scheduler and instead make it your developer’s responsibility. If you are using Pega Robot Manager, you can use the power of Pega Platform to get your work done when it needs to be done. In this case, you might create a case that goes into your robot work queue every fifteen minutes. Your bot would be always listening for new work but would only do that work when something was placed into its queue.

@ThomasSasnett So is what you are saying - create one job scheduler and in the case type have it submit to queue every 15m up until it reaches 10pm?

@PhilipG1165 If you have work that “drops” every 15 minutes, then you would configure your Pega Platform to retrieve that work and drop it into your queue whenever it comes in (be that every 15 minutes or whenever). The bot would be running from 6 AM - 10 PM and would process whatever work appears in the queue whenever that work appears in the queue.

If your bot isn’t working on a specific task but rather you want it to perform an undefined task to check something every N minutes, then rather than configure your bot to do this task only on startup and then shutdown, you might consider configuring it with its own means of waiting after it performs the task to wait until your 15 minutes has elapsed and then perform the task again. That would certainly simplify the steps involved (since it won’t need to logoff and then logon again between intervals). In this case your schedule would be 6 AM - 10 PM and the bot itself would have its own timer on when to perform the task.

@PhilipG1165 Fixed it myself,

Job Scheduler set to every 15 minutes, but with a when condition of it being post 6am and pre 10pm

@and(@hour(@dateTimeToBigDecimal(@CurrentDateTime(),“DateTime”,tools))>5,@hour(@dateTimeToBigDecimal(@CurrentDateTime(),“DateTime”,tools))<22)