Need to run a schedule job for only on weekdays but without a code change on production

ShubhankarK9612
Mega Contributor

Hi All,

 

I need to modify an existing schedule job for email notifications to run only on weekdays but without a code change on production. And would business calendar help in achieving this in any way? Please see the attached screenshot.

2 ACCEPTED SOLUTIONS

Hemanth M1
Giga Sage
Giga Sage

Hi @ShubhankarK9612 ,

 

why don't you use Run as weekly and check Monday to Friday - this should work 

HemanthM1_0-1766741559949.png

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

View solution in original post

Hi @ShubhankarK9612 ,

 

I don't think so. The earliest you test is tomorrow, since it's the weekend

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

View solution in original post

13 REPLIES 13

Hi @nayanmule ,

 

Seems available from Zurich release, you don't want to disturb the code, you can explore Business Calendar(until you upgrade to Zurich or Higher version) - may be for few Months
1)Create Business Calendar - Weekdays

2)Add entries for each week (Monday to Friday) for next few months

3)Use that business Calendar

** This hasn't tested, please set up and verify before you move this to Production**

Sample :

HemanthM1_0-1766744568344.png

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Hi Hemanth, 

 

Thanks. As you mentioned I created one weekday business schedule chose 2025 week 52 and start date is 22nd and end date is 24th Dec for testing. And now when I execute the schedule Job it starts triggering notifications. Is there any way I can test this without waiting weekends. 

Hi @ShubhankarK9612 ,

 

I don't think so. The earliest you test is tomorrow, since it's the weekend

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Thank you  @ShubhankarK9612 

 

If this wouldn't work, the only way out is conditional run using script! - in here ideally your not touching the existing script but adding conditional logic which is completely ok! 

 

 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Hello @ShubhankarK9612  , Ignore my last response. 

You can bring that field on the form by using form layout. The field is available - "Run Days of Week".

 

If my response has helped you, mark it as helpful and close the thread.

 

Regards,

Nayan