Azure / azure-functions-java-library

Contains annotations for writing Azure Functions in Java
MIT License
42 stars 42 forks source link

TimerTrigger annotation doesn't cover 'useMonitor' and 'runOnStartup' #147

Open YusukeTobo opened 3 years ago

YusukeTobo commented 3 years ago

I'd like to enable runOnStartup in function.json, but as far as I see the TimerTrigger anntation class, it's not supported. Additionally, I found that we cannot change useMonitor into false via TimerTrigger anntation. Should we support these settings in the anotation?

https://github.com/Azure/azure-functions-java-library/blob/dev/src/main/java/com/microsoft/azure/functions/annotation/TimerTrigger.java

https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/azure-functions/functions-bindings-timer.md#configuration

YusukeTobo commented 3 years ago

Workaround for the issue😉

  1. mvn package
  2. manually edit function.json at target/azure-functions/[appname]/[function name]/function.json
  3. mvn com.microsoft.azure:azure-functions-maven-plugin:deploy