Azure Webjobs on a python SDK

1k Views Asked by At

This may be a very basic question but forgive me, I am a week old in AZURE. I have built a webjob and it executes my basic python scripts quite well within my service app interactive window in Azure portal. I call them basic python scripts because they import no specialized modules. I have more complex python scripts which are currently scheduled in windows scheduler and would like to get them managed within webjobs. The scripts import multiple python libraries including specialized spatial ones.

In the windows task scheduler I direct them to be executed by a set cloned environment which has all relevant packages installed.

  1. How can I do this in webjobs on a VM?
  2. All I have got concerning getting started with webjob SDKs is this article with everything done in C# in which I have no experience. Can someone direct me to a python resource that does the same if it exists.

See what I have tried

enter image description here

When I check in the logs this is what I get

enter image description here

Usually the modules that cannot be found are in a cloned envirnment which I direct the windows scheduler to read from. How do I do this in webjobs?

1

There are 1 best solutions below

13
On

UPDATE

enter image description here

You should put all the content in your site-packages folder and your CentroidsDload.py file together into a zip file for uploading.

For more details, you can refer to this post.

Running Python script from Azure WebJob

  1. You can't do this webjob in a VM.

If you have a vm, you can host your web in iis. And you can run all programs you want. These have nothing to do with webjob, which is a concept in webapp.

  1. You should not pay attention to webjob sdk related content, as long as your script or program can run normally, upload it.

WebJob is an extended function of App Services under the Windows platform.

You can upload your scripts or programs as background processes in the context of your app.

enter image description here

enter image description here