Search code examples
pythonazureazure-webjobs

Run one file among multiple files in azure webjobs


I am trying to run a contionus azure webjob for python.

i have 6 files where main.py is the main file, other files internally importing each other and finally everything is being called from main.py, now when i am trying to run only the first python file is getting executed, but i want that when the webjob will start only main.py will be executed not anything else. how to achieve that ?


Solution

  • This is quite simple. In azure webjob, if the file name starts with run, then this file has the highest priority to execute.

    So the most easiest way is just renaming the main.py to run.py.

    Or add an run.py, then call the main.py within it.