question

ArnoneAnthony-5113 avatar image
0 Votes"
ArnoneAnthony-5113 asked MayankBargali-MSFT edited

Java azure function Timer Trigger

I have a Java azure function Timer Trigger that ran unexpectedly due to ispastdue flag, I have read that if you set UseMonitor to false you can disable the function running if it misses the scheduled run. However with in java I do not see where I can set this value, in the @TimerTrigger annotation UseMonitor = false is not allowed. Does anyone know where this can be set?

azure-functions
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ArnoneAnthony-5113 I will confirm with my team if this is supported with Azure Java function as I don't see any option in TimerTrigger to set this.

0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

@ArnoneAnthony-5113 Annotation does not supported runOnStartup as per the TimerTrigger code. But you can define the same in the configuration section on function.json

I haven't tried it out but looks like once you have build your application you can see the target folder --> azure-functions --> yourtimertriggernamespecified --> Timertriggername -->function.json

You can update this function.json file before deploying your application to azure or post deployment you can also update this function.json using KUDO console.

We have created the pull request to add missing configuration properties for the Timer Trigger annotation : https://github.com/Azure/azure-functions-java-library/pull/154

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.