简体   繁体   中英

Azure Webjobs on a python SDK

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

在此处输入图片说明

When I check in the logs this is what I get

在此处输入图片说明

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?

UPDATE

在此处输入图片说明

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.

在此处输入图片说明

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM