cancel
Showing results for 
Search instead for 
Did you mean: 

Blueprism Calendar to run process quarterly

ParnabSinha_Cho
Level 5

Hi,

We have a process which needs to run every 4 hours on the first 7 days of a quater and every 4 hours on last 7 days of a quater. We thought of using an Excel based calendar, but there is restrictions on process that it should only launch on the desired date only and frequency. There should not be any other run instances in the scheduler. I was thinking to use Blueprism calendar, but that means I have to add almost 300+ days in the non working section. If there any smarter way to handled this,



------------------------------
Parnab Sinha Choudhury
RPA Developer / Business Analyst
------------------------------

Parnab Sinha Choudhury RPA Developer / Business Analyst
3 REPLIES 3

PvD_SE
Level 12

Hi Parnab,

The built in calendar is less that great...

We have a similar requirement and decided to run the process on the days where data might be ready. As soon as it does, it processes the data and moves it away to avoid reprocessing. On the days there was no data, the process simply states this and ends.

In your example, you could build a routine that runs every day of the year and checks if the current date is suitable for running or not and then trigger the process if it is a suitable day. Checking if a day is suitable for running or not could be done by reading a TXT, a CSV or an XL file prepared for this purpose.

Alternatively, you start your process using the AutomateC.exe command from an external calendar. I have no experience with that, but assume such an undertaking would be viable.

Let us know how you solved this!



------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

Mukeshh_k
MVP

Hi @ParnabSinha_Cho , I assume you can create quick validation process which runs daily during the required quarter- calculates the Today() retrieves Month and Year - Calls an object where it calculates the 1st day of month and give back output as first day of month - it validates the days period less then or equal to <=7 and similarly if it fails the first validation it goes to calculate the last day of month and checks the 7 days difference if it passes as complete - If both of these Validation Fails throw an Exception, else complete the Validation Process> Go to Schedule Create a generic Schedule (Daily) for Validation Process as Task 1 and assign Task 1 - On complete > Run the Actual Process as you stated above as Task 2 and On Exception > Abort.

Example:

24400.png

Calculating the First Date of Month is easy as it can replace today with 1st day of the month, to Calculate the Last date of Month : Create a custom in any of your C# object or Extended Object as below :

24401.png

Input Date : example - 23/03/2023 05:48:54

24402.png

Set Output: as Number for last Date of Month

24403.png

Code: lastDayOfMonth = DateTime.DaysInMonth(date.Year, date.Month);

24404.png

Preview the Last Date of Month in Calculation Stage: [lastDayOfMonth]&"/"&FormatDateTime([date], "MM")&"/"&FormatDateTime([date], "yyyy")

24405.png



------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

SianFrancis
Level 3

Hi Parnab,

I have a similar need and created an Excel table with calculations to determine things like current financial period, financial year, working day, etc., based on 'Today'.  Like Paul, I have a process that runs daily to collect the information from this table which outputs the required information to identify if certain tasks should be run or not.

The calendars do not lend themselves to 'financial' calendars at all and there is a lot of maintenance required should you want to use them in this way.

I have made a suggestion via the BP Ideas Portal (https://community.blueprism.com/content/ideas/viewidea?IdeationKey=f1080cf7-b4d7-434d-afd3-3c763482e454) regarding this around 9 months ago.



------------------------------
Siân Francis
RPA Specialist

Wales
------------------------------