Timing of Periodic Functions

Jan 27, 2015 at 9:10 PM
Edited Jan 27, 2015 at 9:11 PM
I have a periodic function that needs to run at 00:00:00 on January 1 to reset a counter for the new year.

I set up a periodic function. On the detail page for the plugin, I set:
Period = 1
Period Unit = Years
Start Date = 1/1/2016
Time: 12:00 AM

When I save, the "Next Execution Time" is listed as one year from right now. Which is right?

Thanks,
Bob
Coordinator
Jan 28, 2015 at 3:49 PM
Hi again Bob,

This one is definitely a bug.
A new version will be released in few minutes.

Thanks,
-Amine
Jan 28, 2015 at 4:27 PM
Edited Jan 28, 2015 at 4:27 PM
Hey Amine,

Since the above issue happens also on CRM 2011 - can you put up a bug fix for CRM 2011?

Thanx,
Avi.
Coordinator
Jan 28, 2015 at 10:20 PM
Hi Avi,

It's done ;) Version 1.3.2.5 for CRM 2011 is now available on downloads page.

Regards,
-Amine
Jan 29, 2015 at 2:48 PM

Amine,

Thanx J

You’re a real saver.

Avi.

Jan 29, 2015 at 3:57 PM
Sorry Amine,

But after importing your fix, I still have the same issue:
The next execution is calculated from NOW (e.g. Jan. 29,2016) instead of the defined date (e.g. Jan. 1,2015).

Avi.
Coordinator
Jan 29, 2015 at 4:33 PM
Can you try to recreate a new one with Start Date 01/01/2016 please ?

Thanks,
-Amine
Jan 29, 2015 at 4:43 PM
I have created one for Jan. 1,2016 and now it shows "Next Execution 01-01-2016" !
It seems the bug occurs when the "Start Date" has passed already.

Avi.
Coordinator
Jan 29, 2015 at 5:02 PM
When a scheduled plugin is created an asynchronous process is registered to the calculated date.
In your case, the process was already registered to jan, 29, 2016
To fix your scheduled processes, you have to recreate them :)

-Amine
Jan 29, 2015 at 5:07 PM
Sorry for my ignorance, but what do you mean by "recreate the processes" ??
I have made a new Scheduled Plugin !

Avi.
Coordinator
Jan 29, 2015 at 5:15 PM
It's Ok, you did well :)
All you have to do is recreate Scheduled Plugins.
The associated process (Bulk Delete) will be recreated automatically :)

-Amine
Jan 29, 2015 at 6:00 PM
Thank you!
Jan 29, 2015 at 6:04 PM
Amine,

I have taken these steps:
  1. Exported all my Easy Plugins to TXT file.
  2. Deleted the EasyPlugins solution (and published)
  3. Imported the last solution (ver. 1.3.2.5)
  4. Published all
  5. Created a brand new Scheduled Plugin with Start Date 01-01-2015 with Period=1 year
  6. Added a Request attribute and an Action
  7. Saved
  8. Activated
And I still get Next Execution 29-01-2016 :(

Avi.
Coordinator
Jan 29, 2015 at 9:52 PM
Absolutely !

If you Set a past date, it will trigger now then (Frequency x unit) from now.
In your case, just set the start date to 01-01-2016 to make it work :)
Is it ok ?
Jan 31, 2015 at 6:29 PM
OK now Iget it :)

Thanx for your patiance.

Avi.