Question
Hitachi Digital Services
US
Last activity: 6 Dec 2024 6:50 EST
Schedule Job Scheduler to run only on business days.
Hi All,
We have a requirement to run a batch process every week on Monday. however, if Monday is a holiday, batch process should run the following working day i.e. Tuesday.
Is there a way job scheduler could handle this business day logic. Because as per my understanding, it would run as per the schedule without checking if it is a business day or not.
***Edited by Moderator Marije to add Enhancement Request tags***
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 11 Apr 2023 6:56 EDT
Pegasystems Inc.
GB
@GitarthaD33 @KirtiG38 I've checked and this Enhancement Request has already been logged for future consideration by our Engineering teams:
FDBK-96018 (Job schedulers - Multiple executions in off business hours only)
I have added your vote internally in order to make show interest in this feature more prominent.
If you need further details or to discuss it, please contact your Pega Account Executive.
Bits in Glass
IN
@KirtiG38 one workaround approach could be-> we can configure a calendar rule. Then in the first step of the job scheduler activity, we can get to know that current date is holiday or not with the help of calendar rule. If holiday, exit activity.
Hitachi Digital Services
US
@Anoop Krishna - Hi Anoop this would not ensure the batch would again run on Tuesday. Just for this scenario, i have to schedule the job scheduler on Monday and Tuesday. Skip processing on Monday and run on Tuesday (if it is a holiday). Skip processing on Tuesday, if Monday was not a holiday. Doesn't seem like a good approach.
Bits in Glass
IN
@KirtiG38hello Kirti, not sure if we have any direct approach. But in this workaround approach if we need to process the batches next day Or next working day we can find the difference between current date(holiday) and next working day and queue it to dedicated queue processor with delayed time.
Wipro
US
Yes, it is possible to schedule a job scheduler to run only on business days using the Pega Business Calendar feature. You can set up a business calendar that defines the working days and holidays for your organization and then use that calendar to schedule the job.
To do this, follow these steps:
- Create a new Business Calendar by navigating to Designer Studio > Org & Security > Organization > Business Calendars.
- Configure the calendar by adding holidays and defining working hours for each day of the week.
- Save and activate the calendar.
- Navigate to Designer Studio > System > Operations > Schedule Job to schedule the batch process.
- Under the "Advanced" tab, select the appropriate Business Calendar from the drop-down menu.
- Set the job frequency to "Weekly" and select the appropriate day of the week (Monday).
- In the "Additional Options" section, select the "Skip Non-Business Days" checkbox.
- Save the job scheduler.
With these settings, the job scheduler will run every Monday, but if Monday is a holiday, the job will run on the next working day (Tuesday).
Hope this helps.
Hitachi Digital Services
US
Hi Rishab,
Appreciate your detailed response to my query. However, i am not sure if i am missing anything. I don't see Advanced tab on Job Scheduler rule or "Schedule Job" wizard anywhere in developer portal. Could you please advise. We are using Pega 8.4.
Thank You!
Wipro
US
I understand your confusion regarding the "Advanced" tab in the "Schedule Job" wizard in Pega 8.4. In Pega 8.4, the "Advanced" tab has been replaced by a "Cron Expression" field where you can enter a cron expression to schedule your job.
To create a cron expression that meets your requirement of running the batch process every Monday, but running it on Tuesday if Monday is a holiday, you can follow these steps:
- Create a new Business Calendar by navigating to Designer Studio > Org & Security > Organization > Business Calendars.
- Configure the calendar by adding holidays and defining working hours for each day of the week.
- Save and activate the calendar.
- Navigate to Designer Studio > System > Settings > Schedule Job to schedule the batch process.
- Select the appropriate Business Calendar from the drop-down menu.
- Set the job frequency to "Weekly" and select the appropriate day of the week (Monday).
- In the "Cron Expression" field, add a condition that checks whether the current day is a business day. You can use the following expression: 0 0 12 ? * MON-FRI *; This expression will run the job every Monday to Friday at 12 PM, but only on business days.
With these settings, the job scheduler will run every Monday, but if Monday is a holiday, the job will run on the next working day (Tuesday).
I understand your confusion regarding the "Advanced" tab in the "Schedule Job" wizard in Pega 8.4. In Pega 8.4, the "Advanced" tab has been replaced by a "Cron Expression" field where you can enter a cron expression to schedule your job.
To create a cron expression that meets your requirement of running the batch process every Monday, but running it on Tuesday if Monday is a holiday, you can follow these steps:
- Create a new Business Calendar by navigating to Designer Studio > Org & Security > Organization > Business Calendars.
- Configure the calendar by adding holidays and defining working hours for each day of the week.
- Save and activate the calendar.
- Navigate to Designer Studio > System > Settings > Schedule Job to schedule the batch process.
- Select the appropriate Business Calendar from the drop-down menu.
- Set the job frequency to "Weekly" and select the appropriate day of the week (Monday).
- In the "Cron Expression" field, add a condition that checks whether the current day is a business day. You can use the following expression: 0 0 12 ? * MON-FRI *; This expression will run the job every Monday to Friday at 12 PM, but only on business days.
With these settings, the job scheduler will run every Monday, but if Monday is a holiday, the job will run on the next working day (Tuesday).
I hope this clears up any confusion you had. Let me know if you have any further questions.
Hitachi Digital Services
US
Hey Rishab, is this configuration RPA related. I do not see this configuration.
I have attached the screenshot of the Job scheduler.
Vodafone India Service Pvt.Ltd
IN
@RishabR16722312 Rishab, I like to schedule my job to run multiple time from Monday to Friday only. I see the option run weekly it run only once in in those days. But i want to run multiple times in tose days.
Maantic
IN
Hello @SreenivasuluAyapati,
Are you referring to the Pega Platform job scheduler or the Robot Job Scheduler?
The Job Scheduler in Pega does have the option to schedule Multiple times a day.
Thanks!
Accepted Solution
Updated: 11 Apr 2023 6:56 EDT
Pegasystems Inc.
GB
@GitarthaD33 @KirtiG38 I've checked and this Enhancement Request has already been logged for future consideration by our Engineering teams:
FDBK-96018 (Job schedulers - Multiple executions in off business hours only)
I have added your vote internally in order to make show interest in this feature more prominent.
If you need further details or to discuss it, please contact your Pega Account Executive.