0

I have a custom timer job with a yearly schedule (SPYearlySchedule). After I deploy it, its Schedule Type listed under Job Definitions in Central Admin is shown as Yearly as expected. However, if I manually run this timer job (by clicking "Run Now"), the Schedule Type for the job is immediately changed to Hourly - and indeed the job will run every hour after this, instead of every year.

Note that this problem doesn't occur if I use other schedule types such as SPMonthlySchedule, i.e. schedule types for which SharePoint actually has UI for (SharePoint's UI lacks a radio button for a yearly schedule) - so this is not a problem related to my source code.

What could be the cause of this? Is this yet another SharePoint bug?

  • I would suspect that once you click run now, it saves the settings on the page and defaults to hourly since nothing is selected. When you run the Timer Job from PowerShell does it also revert to hourly? – James Grizzle Sep 12 '14 at 13:19
  • I haven't tried with PowerShell as I can't have users rely on it. What I have tried is resetting the schedule at the end of the Execute() method, but that doesn't help either. – w128 Sep 12 '14 at 13:26
  • I was suggesting trying just so you could know for sure if it is a problem with the GUI. When I create complicated list views that aren't possible with the GUI, changing the view in the GUI breaks the view. I suspect you are dealing with something similar. – James Grizzle Sep 12 '14 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.