Azure Timer Trigger Function Not Executing After Deployment – Error 500 on Portal Test

Afaq bukhari 0 Reputation points
2025-04-15T21:31:37.98+00:00

Hello,

I’ve created a basic timer_trigger Azure Function using Visual Studio Code using Python. It works perfectly in my local environment. However, after deploying it to Azure, the function does not run at all.

When I try to test or run the function through the Azure Portal, I receive the following error message:

"Function triggers synchronization failed due to Response status code does not indicate success: 500 (Internal Server Error)"

The deployment itself completes without any issues, and the function appears in the portal, but the trigger doesn’t execute automatically or manually, I tried using HTTP function as well but same results.

(I am not using pay as you go, using free 200$ credit subscription plan)
Has anyone encountered this issue before or know what could be causing this error?

Any help or guidance would be greatly appreciated!

Thank you.

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[4.*, 5.0.0)"
  }
}

import logging
import azure.functions as func

app = func.FunctionApp()

@app.timer_trigger(schedule="0 * * * * *", arg_name="myTimer", run_on_startup=False,
              use_monitor=False) 
def timer_trigger(myTimer: func.TimerRequest) -> None:
    if myTimer.past_due:
        logging.info('The timer is past due!')

    logging.info('Python timer trigger function executed.')

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.