Apparently there used to be a way to create custom timers for Azure Functions, by creating a class that inherits from TimerSchedule
and defining the custom logic in its GetNextOccurrence
method.
We've got an MSDN post about it,, we've got a StackOverflow answer about it, and even some official sample code that uses custom timers.
None of it works.
None of these samples have a FunctionName
attribute on their functions, which is needed (in the current SDK version, at least; not sure how long this has been the case) to make the Azure Function job actually run. And in the current SDK, any function that has both a FunctionName
and a TimerTrigger
that uses a custom timer type will fail to build with an error like this:
System.NotImplementedException: Property 'ScheduleType' on attribute 'TimerTriggerAttribute' is not supported in Azure Functions.
Apparently this used to work, but it doesn't now, and I'm having a heck of a time finding any relevant information on what the correct way is to do it now. Does anyone know what the new way is to set up a custom timer?