Azure Function App in Python 3.8 Timer trigger is not running for some reason

Danny Luces 0 Reputation points
2024-06-10T12:24:16.2733333+00:00

I have a python script that has been tested locally and works fine, it connects to an API, obtains and organizes data, and sends an email via SMTP, simple and works fine locally. I tried deploying it into an Azure Function App adding a timer trigger so it runs once a day at 7am UTC+1, everything seems to be enabled and fine, but it never triggers and I'm not sure how to check or fix that.Functionapp

Is this the right way to do it? Am I doing something obviously wrong? Thanks very much in advance!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,679 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 31,211 Reputation points MVP
    2024-06-10T14:00:17.93+00:00

    Hello @Danny Luces ,

    welcome to this moderated Azure community forum.

    It seems you follow the guide seen here.

    After a quick comparison, it seems this line is missing:

    @app.function_name(name="mytimer")
    

    There seems to be more changes but it's not clear if these cause the issue.

    I recommend putting your code on hold and try to roll out the sample seen in that tutorial first.

    If that works, transform it step by step (baby steps) with your code.

    Add some comments also.

    Another trick is executing your code first inside a HTTP Triggered function (this speeds up testing because you can trigger it yourself). Then you know if the problem is cause by your code or the 'function wrapper code'.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments