I have written a function in Typescript with a timer trigger.
The first function I wrote had the cron expression 0 0 13 * * 1-5
Then I copied the function for another task which I chose the cron expression 0 0 3 * * 1-7 for.
I made the wrong assumption that 1-5 would be Monday-Friday and derived that 7 would then be Sunday
The problem was that the second function was never run and thus part of the software was never working at all. The weekdays start at 0, not at 1
I would expect that the schedule property from the TimerTriggerOptions interface in @azure/functions library is migrated from type string to a complex type that validates each nchron expression element
Pseudocode (incomplete)
In addition (or as a replacement if the suggestion above is not feasible), the vscode azure functions extension should validate the nchron strings it finds in the codebase and show invalid expressions in the Problems view.
If this is also not possible, it should at least scan functions before the deploy action is done in vscode so invalid nchron expressions can never be deployed
As suggested in https://github.com/microsoft/vscode-azurefunctions/issues/4167, I am recreating the issue here.
Issue description:
I have written a function in Typescript with a timer trigger. The first function I wrote had the cron expression
0 0 13 * * 1-5
Then I copied the function for another task which I chose the cron expression0 0 3 * * 1-7
for. I made the wrong assumption that 1-5 would be Monday-Friday and derived that 7 would then be Sunday The problem was that the second function was never run and thus part of the software was never working at all. The weekdays start at 0, not at 1I would expect that the schedule property from the TimerTriggerOptions interface in @azure/functions library is migrated from type string to a complex type that validates each nchron expression element Pseudocode (incomplete)
In addition (or as a replacement if the suggestion above is not feasible), the vscode azure functions extension should validate the nchron strings it finds in the codebase and show invalid expressions in the Problems view. If this is also not possible, it should at least scan functions before the deploy action is done in vscode so invalid nchron expressions can never be deployed