My time trigger function is not triggered when deploying it on Azure functions. I deploy it using docker container because I am using selenium.
This is my function header:
app = func.FunctionApp()
@app.schedule(schedule="0 */5 * * * *", arg_name="mytimer", run_on_startup=False,
use_monitor=False)
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.now(datetime.timezone.utc).replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
logging.info('Python timer trigger function executed.')
run()
And these my binding and configure files for more reference:
//function.json
{
"scriptFile": "function_app.py",
"bindings": [
{
"name": "mytimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 */5 * * * *"
}
]
}
//host.json
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}
}```
local.settings.json
{
“IsEncrypted”: false,
“Values”: {
“AzureWebJobsStorage”: “”,
“FUNCTIONS_WORKER_RUNTIME”: “python”,
“AzureWebJobsFeatureFlags”: “EnableWorkerIndexing”
}
}
This is my function overview, it changed the runtime version but didn't add the function to the Functions list
[enter image description here](https://i.sstatic.net/tnwEpCyf.png)
It run successfully on my local host and is triggered perfectly fine, but when deploying it on azure it doesn't got triggered. I don't get any exception. the real problem that it was triggered even after deploying on Azure and I got exceptions due to some errors with docker, but it was triggered. after deploying it again for multiple of times, it doesn't even got triggered and I didn't change anything in the configurations. for testing it suppose to be triggered every 5 minutes.