Skip to main content
August 12, 2025
Solved

How to Get Last Working Day of the every month

  • August 12, 2025
  • 7 replies
  • 0 views

Hi Team,

I need Last working Day date of every month as i need to start process for every month Last working day.

Let's say if i take Aug-2025 Month & its month end date is 31st & falls on Sunday but in my case process should trigger on 29th Aug which is a last working day.

I need dynamic approach so that it iwll pick last working date & start process.

prompt response really appreciated,Thanks

Best answer by shubhama926776

Create a process model with a Timer Start Event set to run daily. Connect it to a Script Task that checks if today equals the last working day using below expression. Add an XOR Gateway that routes to your monthly process when isLastWorkingDay is true, or to an End Event when false. 

By using this expression you can find last working day of every month.

a!localVariables(
  local!lastDay: eomonth(today(), 0),
  local!dayOfWeek: weekday(local!lastDay),
  local!lastWorkingDay: if(
    or(local!dayOfWeek = 7, local!dayOfWeek = 1), 
    if(local!dayOfWeek = 7, local!lastDay - 1, local!lastDay - 2),
    local!lastDay
  ),
  local!lastWorkingDay
)

7 replies

shubhama926776
August 12, 2025

Create a process model with a Timer Start Event set to run daily. Connect it to a Script Task that checks if today equals the last working day using below expression. Add an XOR Gateway that routes to your monthly process when isLastWorkingDay is true, or to an End Event when false. 

By using this expression you can find last working day of every month.

a!localVariables(
  local!lastDay: eomonth(today(), 0),
  local!dayOfWeek: weekday(local!lastDay),
  local!lastWorkingDay: if(
    or(local!dayOfWeek = 7, local!dayOfWeek = 1), 
    if(local!dayOfWeek = 7, local!lastDay - 1, local!lastDay - 2),
    local!lastDay
  ),
  local!lastWorkingDay
)

August 12, 2025

What if the last working day e.g Monday is a holiday?

stefanhelzle0001
August 12, 2025

https://appian.rocks/2023/07/03/the-working-time-problem/

This might help you finding the closest working day.