web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Trigger the workflow every last day of the month

(0) ShareShare
ReportReport
Posted on by

Hi,

I need a workflow to run every last day of the month. Here is the link where it is described how to schedule recurring workflows, but in the example it creates workflow which will work every month (started counting from first manual trigger).
How can I do this  for the last day of the month? If I will manually trigger it on 30th day of the week, and next week will be 31 days, the workflow will be still triggered on 30th day again..
Every help will be much appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Trigger the workflow every last day of the month

    Hi,

    I would suggest you to create a console application and execute the workflow using ExecuteWorkflowRequest. After that, using task scheduler to schedule the console application.

    docs.microsoft.com/.../gg307964(v%3Dcrm.8)

    if you have Microsoft Flow

    docs.microsoft.com/.../run-scheduled-tasks

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Trigger the workflow every last day of the month

    Hi,

    I don't think there is any straight forward way to run a workflow on the last day of month. You need to write custom code for this to get the exact date i.e. 30, 31 or 28 and then use that instead.

    The other option is to check if you can use  github.com/.../CRM-DateTime-Workflow-Utilities

    Hope this helps.

  • Community Member Profile Picture
    on at
    RE: Trigger the workflow every last day of the month

    I just need to know is there way to do this without any code. Like in that blog it is written timeout 1 month (where one month is not 30 days, it depends which month it is). To do like this (1 month - 1 day) somehow and start this workflow at 1 day of the month, so other processes will be done 1 day earlier :)

  • Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: Trigger the workflow every last day of the month

    You can run your Workflow in each 30 days if you do not want to code.

  • Community Member Profile Picture
    on at
    RE: Trigger the workflow every last day of the month

    In that case it will not work properly and will not work only on the last day of the month.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Trigger the workflow every last day of the month

    Hi

    To answer your questions- No, there isn't any configuration/ customization to do this without code. However there are some custom workflow utilities (which are again built using code) which you can try. So don't need to write any code for this, so just have to download the solution contains the utilities.

    Same link which I shared above: github.com/.../CRM-DateTime-Workflow-Utilities

    There is a step which returns "Get Month Start/End Dates" so this is something you can try.

    Hope this helps.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Trigger the workflow every last day of the month

    Try something like this:

    month.png

  • Marx2020 Profile Picture
    175 on at
    RE: Trigger the workflow every last day of the month

    If you use a modern flow (Power Automate), you can create a workflow to run at (say) 11pm each day.  Within the workflow, set two variables - start of month (inbuilt function startofmonth) for today, and using addDays (1) calculate the start of month for tomorrow's date.  Create a condition to run your process only if the second variable (start of month for tomorrow's date) is greater than the first variable.

    pastedimage1637025077087v1.png

    Hope this helps if anyone is looking to solve a similar problem.

    Steve.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans