lucasalexander / AlexanderDevelopment.ProcessRunner

This is an open source Dynamics CRM solution for scheduling and executing recurring workflows
http://alexanderdevelopment.net/
Apache License 2.0
24 stars 8 forks source link

Set the process to run monthly/annually #2

Closed ghost closed 5 years ago

ghost commented 6 years ago

Hello Alexander,

Is there a way I can set the frequency of the Process to different values (monthly, bi-weekly or annually)?

Best regards, Hayman

bennyboy23 commented 5 years ago

I am also looking to setup a monthly process, and the readme seems to indicate that one can do a monthly setup but the option is not available @lucasalexander are you able to help with this?

Thanks, Ben

lucasalexander commented 5 years ago

You would need to make a few changes to the CRM solution to enable different frequencies.

  1. You would need to modify the recurring process record's optionset to include the new frequency.
  2. You would have to update the "recurring workflow runner" workflow to increment the next run date value for the new frequency. So, if you added a monthly frequency, you would need to push the next run date out by a month. You would need to decide what to do where that's not feasible. For example, if the process runs on January 31, is a month later February 28? This is the main reason I never added a monthly option myself. :(
bennyboy23 commented 5 years ago

Hi Lucas, Thank you for the reply, yes I should've realised that before raising the query. Thankfully this workflow is running from the 28th of the month so it will work for every month 😄 I think you can close this considering the OP is now a ghost.

Thanks, Ben

lucasalexander commented 5 years ago

Sounds good, thanks!