PS: Complete beginner here.
Because of some restrictions in the company policies, I am not able to test this function locally. However I was able to deploy the function to our functionapp.
I have a init.py which looks like below :
import datetime
import logging
import azure.functions as func
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Hello!!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
The function.json looks like below :
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "mytimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "* * * * *"
}
]
}
I expect the log statements to be shown every minute, but that does not seem to be the case.
Output:
What am I inspecting wrong here?