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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Recurrent jobs without getting infinite loops

(0) ShareShare
ReportReport
Posted on by

Hi everyone, I tried many solutions suggested to run recurrent workflows within Crm. Each solution I try, I end up with and infinite loop. Is there a way to to a recurrent workflow within Crm without ending with an infinite loop? Thanks a lot

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    Hi,

    There are multiple ways to create Recursive workflow

    Check these solution

    community.dynamics.com/.../scheduling-recurring-workflows-in-microsoft-dynamics-crm-2011-online-and-on-premise

    community.dynamics.com/.../create-recursive-or-scheduled-workflows-in-crm

    www.powerobjects.com/.../setting-up-recurring-workflows-in-dynamics-crm-2016

    Also, in CRM if you are not using Goals for anything, then you can use Goal entity also, Generally goals are recalculated every day, and you can schedule one workflow to run on goal modified on, and in that workflow you can call your main workflow.

    hope this will help..

  • Community Member Profile Picture
    on at

    Have you tried them on your own? I tried the last two and got infinite loops at a certain point (On depth 16). Also, if you look at comment on 3rd solution, you can read:  

    I did a similar solution form crm 2016 online by creating two workflows and once the 1st workflow is done it calls the 2nd workflow which later on called 1st workflow. It worked fine for around 8 executions but later on the workflows were stopped by the system with the following error :

    This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again. For information about workflow logic, see Help.

    Any idea on this ?

    Then:

    Yes, this will eventually happen when using workflows which trigger each other. This solution is therefore inherently flawed, the only alternative would be to create a script/console app to initiate an new on-demand workflow on a schedule.

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    I am using Goals for my recurring workflow.

    I create one record in Goal entity, and create one workflow on Goal entity, when goal is modified workflow is executed.  

    In Goal workflow i am calling my another custom workflow.

    This is working for me from last 8 months without any problem.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Frantz, you can try creating the schedule using the bulk delete method, which will then trigger the workflow. We have been using this method since CRM 2011 without any issues..

    community.dynamics.com/.../scheduling-recurring-workflows-in-microsoft-dynamics-crm-2011-online-and-on-premise  

  • Verified answer
    Nuno Profile Picture
    2,005 on at

    Hi Frantz,

    On CRM online when the depth reaches 16, the Infinite loop message is issued. On-premise the max depth is 8.

    The depth is incresead by one when a CRM event triggers another one and have not passed 60 minutes.

    So, in your case, to avoid the infinite loop, before any workflow calls other, you must put the workflow waiting for more than 60 minutes.

    This way, the depth in each instance of the workflows will always be 1.

    Regards,

  • Community Member Profile Picture
    on at

    Tnx, I need my recursive WF every 10 minutes, so now I created a start recursive WF who triggers the recursive WF (with a timeout of 61 minutes) 6 times.

  • Kenneth Leong Profile Picture
    360 on at

    Instead of using "start child workflow", write a workflow assembly that executes workflow (itself). dynamics won't know it's part of the same loop.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans