Azure timer trigger function using Python

Multi tool use
Multi tool use


Azure timer trigger function using Python



I am writing an Azure timer trigger using Python 3.x. I've got one such function running. I think I know to do it, create one from JS and then delete the 'index.js' and create a run.py. But this time, when I run my python function, I always got an error saying "No such file: index.js". I didn't see any bonds between the function and the 'index.js' file.



Any thoughts?





ourwayoflyf.com/running-python-code-on-azure-functions-app
– Laurent Mazuel
Jul 2 at 18:34





@LaurentMazuel Thank you so much but I am exactly following the same step.
– Chen Lin
Jul 2 at 19:06




2 Answers
2



I followed tutorial in comment and reproduce your issue on my side though I refresh the portal.



enter image description here



However, after waiting for some time, it works. I suspect it's due to cache.



enter image description here



I suggest you creating python azure function on kudu directly. Just create run.py and function.json in new folder instead of changing the JS template.


run.py


function.json



enter image description here



Hope it helps you.





Thank you so much for your help. After refreshing several times, my function was finally deployed. Maybe I was just out of luck.
– Chen Lin
Jul 3 at 13:10



We could add the python function from the Azure portal directly. If you want to create Timetrigger function,then we could change the trigger type



The following is my detail steps to create Python timetrigger function.



1.Create an Azure function App



2.Add a python function



enter image description here



enter image description here



3.Change the httptrigger to timetrigger



a. delete the httptrigger and http output
enter image description here



b. add the time trigger
enter image description here



4.Add the test code and test it from Azure portal.



enter image description here



The default version is 2.7.8. If you want to use python 3.x, you could follow this tutorial to update the python version.



5.Update the python version.



a. Install extension for Azure function App



b. Add Handler Mappings entry so as to use Python3.X via FastCGI



enter image description here



6.Test it from Azure portal



enter image description here





Thank you so much for your detailed tutorial. However, actually, my situation is more like Jay's. The Azure function just got stuck and after I refreshed the page for several times, everything was fine.
– Chen Lin
Jul 3 at 13:08






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

SpO yzsNPgTqHSuhvyI,8yzy,01WVZ4NTYGqItqw Xk9d
ym6Vg5yQ,E3,UJWhosNw6KNLOsAXdumsFxiukWaaWRvlh99,T95nVCV,5 4j 1UexdB,xRU,TWTIbAXAN,J qZoNO,VQ3Dmwkk 5vgToiI

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications