Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing configuration properties for the Timer Trigger annotation #154

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,17 @@
* @return A string representing a CRON expression that will be used to schedule a function to run.
*/
String schedule();

/*
* Defines the value indicating whether the function should be invoked when the runtime starts.
* @return The value indicating whether the function should be invoked when the runtime starts.
*/
boolean runOnStartup() default false;


/*
* Defines the value indicating whether the schedule should be monitored.
* @return The value indicating whether the schedule should be monitored.
*/
boolean useMonitor() default false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reference to this link on useMonitor: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=csharp#configuration
So here is one concern:
if the schedule interval > 1 min then default value for useMonitor is true
if customer set false --> function.json will not have useMonitor(tested on local) --> host will set the useMonitor default value to true, this is not what customer want right.

The runOnStartup LGTM. So I wonder can you separate this PR to two, so we can merge the fix for runOnStartup and for useMonitor we can revisit and discuss the change and design. Thanks.

}