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)
Suggested Answer

Best approach to fire a plugin on a schedule

(0) ShareShare
ReportReport
Posted on by 255

Hi

I have some code (in a plugin) that I'd like to use to make regular housekeeping updates to my CRM.
I'm not sure a plugin is the best approach but the functionality needs to run at 15minute intervals.
Would it be better to use a Workflow?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    Hi,

    You can use a custom workflow assembly/action within workflow to achieve the same.

    1. Create workflow to wait for X duration defined in the entity for the specified date i.e. Scheduled Date.

    2. Create an action to perform the logic.

    3. After every x duration, update the date to date+x duration.

    4. Run the workflow on Scheduled Date update.

    If found useful, please mark this answer as verified.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    Plugin is not used for running scheduled tasks in CRM.

    You could use Workflow or Flow or combination of both to do this.

    Workflow is good in executing logic in CRM but it does not have a clean scheduling mechanism.  We can get around this but creating waiting workflows. Where as Flow as a built in schedule trigger.

    So you could consider the following solution which executes a workflow

    community.dynamics.com/.../executing-dynamics-365-workflows-from-microsoft-flow

    I you would like to stick to CRM workflows, please refer to the links below

    community.dynamics.com/.../scheduling-recurring-emails-using-a-workflow

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

    gonzaloruizcrm.blogspot.com/.../quite-often-we-have-business-process.html

    You may have to move your plugin code into a Custom Workflow Activity and call the in the workflow if the logic implemented using Workflow out of the box features.

  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    you can use Azure Functions

    This post will help you with the schedule: https://nishantrana.me/2017/04/29/using-azure-functions-for-writing-scheduled-jobs-for-dynamics-crm/

    and this one to do a certificate based authentication: https://community.dynamics.com/crm/b/crminthefield/archive/2019/05/29/certificate-based-authentication-with-azure-functions-key-vault

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