It would be really useful to have a section that explains how to test timer-triggered functions. It's not clear what the best way to do so is.
My use case involves timer triggers that run infrequently (say, once a day at 8PM). During development, I often want to run the function once to test that it's working correctly. I can deploy to test or run it locally as-is, but then I have to wait until 8PM for it to run. I could tweak the cron expression to run the function more frequently in non-production environments, but that's also not ideal. Is there a better way?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
My bad, I see that this has already been covered by #6926. Feel free to close (although it would be nice to cover this in the documentation, and eventually have a less awkward way of testing timer triggered functions).
Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
@rgwood Per your comment above, we'll go ahead and #please-close
[Edit] After linking to the new wiki page I realized it doesn't address your question. Here's the link anyway:
@rgwood See also this documentation on using the admin API to trigger a function by using an HTTP request: https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#non-http-triggered-functions
Thanks, the admin API looks like it will do the trick! Might be worth adding a mention of that to the Testing functions page when you have time.
@rgwood I just published Manually run a non HTTP-triggered function. I hope this helps address what you are trying to do 😉
Very helpful, thanks!
@tdykstra Just what I was looking for, thanks!
Most helpful comment
@rgwood See also this documentation on using the admin API to trigger a function by using an HTTP request: https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#non-http-triggered-functions