I'm running a simple Python webjob in an Azure Linux webapp.
I am getting this error
Run script 'webjob.py' with script host - 'PythonScriptHost'
f24041: SYS INFO] Status changed to Running
f24041: ERR ] An error occurred trying to start process 'python.exe' with working directory '/tmp/jobs/continuous/test/qsinu4ck.4pl'. No such file or directory f24041: SYS ERR ] System.AggregateException: One or more errors occurred. (An error occurred trying to start process 'python.exe' with working directory '/tmp/jobs/continuous/test/qsinu4ck.4pl'. No such file or directory)
---> System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'python.exe' with working directory '/tmp/jobs/continuous/test/qsinu4ck.4pl'. No such file or directory
What can I try next?
I created a sample python WebJob script and successfully uploaded it to Azure WebJobs without any issues.
The issue is related to PythonScriptHost
because the linux App service's webjob is still in preview.
You need to create the .sh
file along with your python file.
My webjob .py:
print("hello")
script .sh:
python3 webjob.py
I've zipped these files and uploaded it to Azure webjobs.
Here's the output logs: