Azure-docs: Timer trigger testing?

Created on 13 Jun 2018  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

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?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author doc-enhancement functionsvc triaged

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

All 8 comments

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:

https://github.com/Azure/azure-functions-host/wiki/Investigating-and-reporting-issues-with-timer-triggered-functions-not-firing

@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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ponant picture Ponant  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

jebeld17 picture jebeld17  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments