I am trying to run a timer trigger in Azure function which will write into my file saved in the blob storage container output as log.txt. Below is my init.py -
import datetime
import logging
import azure.functions as func
def main(mytimer: func.TimerRequest, outputblob : func.Out[str]) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
outputblob.set('some text')
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
below are the bindings for function.json -
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "mytimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 */5 * * * *"
},
{
"name": "outputblob",
"type": "blob",
"dataType": "string",
"path": "output/log.txt",
"connection": "AzureWebJobsStorage",
"direction": "out"
}
]
}
Also this is the output of the log stream which I checked today, maybe this could help

The function is running but it is not writing anything to the log.txt. I am a beginner in the azure functions, so please pardon silly mistakes.


