cancel
Showing results for 
Search instead for 
Did you mean: 

Setup scheduler based on business day

sapna_soni0290
Level 5

Hi Team,

I want to setup a scheduler to run the process on every 4th & 10th business day at 6 pm CST.

Any option available from scheduler to setup like this without doing it from code level.

Thanks & Regards

Sapna Soni

9 REPLIES 9

HI Sapna,
Based on the description provided. There are two approaches i can think of
1) create two schedulers one scheduled to run on 4th business day and the next scheduler to run at 10th business day at 6 PM CST

harishmogulluri_0-1726008255253.png

 


2) 

Navigate to system tab in Blue Prism enterprise and create a calendar and update for the next 1 or 2 years specifying which dates scheduler need to be excluded
This is not the best approach but you can do this way as well.

Thanks,
Harish

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Thanks harish for the suggestion. I have similar idea in mind. My one worry with this approach is there is a dependency/need to update the calendar each year & what if we forgot to do that, Bot will not trigger.

Any other approach ?

You can set up 2 schedules like this:

  • Schedule 1: Runs on the 4th business day of every month.
  • Schedule 2: Runs on the 10th business day of every month.

Both schedules can be set to run at 6 PM CST.

Brigiana Kopec Senior Product Support Engineer (Bilingual) – Americas

david.l.morris
Level 15

I don't think it is possible to achieve what you're describing purely from Scheduler functionality. The problem is that Scheduler only provides the ability to run on the first or last working day of a week/month OR on a specific # day of a month or a named day of a week, that kind of thing. What you're looking for is like this part of Scheduler's "Run monthly...On the First/Last working day in the following calendar", but it only allows for more First/Last as options, and you need Fourth and Tenth.

davidlmorris_0-1726089430326.png

I certainly could be missing something, but I cannot think of a way to achieve this without logic in the automation. I've done this a lot, and it is unfortunate we have this limitation but you can still achieve the desired results. I should mention though that the holidays could make this more difficult. If your holidays are not standard holidays configured in Blue Prism, then you will need to either update calendars for special holidays yearly, or you will need some kind of API to call to determine holidays.

What I would do and have done before is to put logic at the beginning of your process that checks the Blue Prism calendar or whatever and determines if the current day is either the 4th or 10th Business/Working day of the current month. You'd schedule this to run every working/business day in the calendar that you configure in the System tab. You can do this by using the Calendars internal business object. Then if it is not one of those, then the session ends immediately and perhaps doesn't even send out a notification that it ran. The only downside is that Blue Prism will have run a session that it didn't really need to. But a session that small with such a small session log won't negatively impact anything anyways. It'd just be a sort of silent session that runs every working/business day in the calendar and then only notifies people of its work if it was the 4th or the 10th business day.

Edit: I suppose I should mention that there are other options you can consider, such as a PowerShell script that runs on a runtime resource or server 24/7 or scheduled via Task Scheduler in Windows, and it can use CLI commands (AutomateC.exe) to trigger your process only twice a month.


Dave Morris, 3Ci at Southern Company

Good catch @david.l.morris . I totally agree with the approaches you mentioned.
Thanks for correcting, it is not possible through scheduler as you mentioned, I was under the impression and looking only on the date part and missed to consider the working days.
 

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Yeah, I initially didn't respond when I saw this question because I saw your response and thought that solved it. It wasn't until later I went and remembered that wasn't quite possible.


Dave Morris, 3Ci at Southern Company

Hi Dave,

Thanks for the idea. As i was looking for a code free approach & only thru scheduler, i think creating a calendar for business day is the only approach seems to be possible. If any other scheduler base approach feel free to post.

With your code base approach, just one problem we will face is it still occupy the VDI on those days even though for short time & we won't be able to share it with other process if we want to.

Thanks

Sapna Soni

Hi Sapna,

As Dave mentioned, you can add logic to the start of your process to check if Today's date = 4th or 10th Calendar date.

This will mean that the schedule you create will need to run it every working day, but it's a small price to pay if you cannot/don't want to code this.

It would be something like the below:

 

Asilarow_1-1726133602353.png

 

Andrzej Silarow

@sapna_soni0290 I don't think that calendar approach is actually possible. Maybe I'm just missing something here, but you can only put dates into the calendar for days that are to be considered holidays, and you cannot make schedule run only on holidays. Instead, holidays are intended to be avoided. I really think this isn't possible without either (1) a code solution in a Blue Prism process or (2) a code solution in PowerShell or some other outside system that will trigger Blue Prism processes on the right days by CLI or API etc.


Dave Morris, 3Ci at Southern Company