Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

BC Job Queue "Next Run Date Formula" calc. does not Include a "Business Day" attribute

(1) ShareShare
ReportReport
Posted on by 2
When creating a Job Queue process, there is no way to indicate that the process should run on the last "Business" day of the month - 

This is June of 2025.  The last day of the month is 5/31 which is a Saturday.
I want the process to run on Friday - the last business day of the month. 
 
The Formula I saw online was CM+1D-1WD – should give you Friday this month (5/30) – being that this month ends on a Saturday…
But….
CM (Current Month – or the last day of the month – 5/31 – which is Saturday).
+1D – (Plus 1 Day -which is Sunday)
-1WD (minus 1 Weekday – which should be 5/30 – or Friday)
But it gives 5/31 – which again is Saturday..

I data entered the formula, and it came up: (for the "Combine Shipments" job) 

 
Same is true for example if I want to run something on the 15th - or the last business day before the 15th. 
 
Any thoughts?
 
  • Gerardo Rentería García Profile Picture
    19,825 Most Valuable Professional on at
    BC Job Queue "Next Run Date Formula" calc. does not Include a "Business Day" attribute

    Hi, good day
    I hope this can help you, and give you some hints.

    D365 Business Central : Calculate Dates Based On Working Days - That NAV Guy

    Best Regards
    Gerardo

  • Suggested answer
    Khushbu Rajvi. Profile Picture
    17,377 Super User 2025 Season 1 on at
  • Suggested answer
    Sohail Ahmed Profile Picture
    3,301 on at
    BC Job Queue "Next Run Date Formula" calc. does not Include a "Business Day" attribute
    Maybe this will help clarify.
     
    You're right — Job Queue’s "Next Run Date Formula" does not support true business day logic (i.e., excluding weekends or holidays). The formula CM+1D-1WD still treats all days as calendar days and doesn’t evaluate weekends as non-working days.
     
    Your Options:
     
    1. Use a custom codeunit in the Job Queue that includes logic to:
     
    Calculate the last working day of the month using a custom calendar or work date logic.
     
    Run only when TODAY = LastBusinessDay.
     
     
     
    2. Set job to run daily, and have your logic exit immediately unless it’s the desired date (e.g., last weekday of the month).
     
     
    3. If you want more control, consider using Power Automate or a scheduler outside of BC that has better calendar logic, and trigger BC via API.
     
     
     
    Unfortunately, there’s no built-in date formula in BC that supports “last business day” or “working day before a date.”
     
    Mark below checkbox to make this answer Verified if it helps you. Let me know if you want a sample logic for calculating last business day.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans