Search code examples
pythonazureazure-sdk-python

Automate Python Application in Visual Studio 2017 inside Azure


I am working on extracting Features from csv files and I use Python to perform the task. I am inside Azure and created a Python Application using Visual studio 2017. It works perfectly fine and i am looking for ways to automate the process so that it runs in batches per schedule.

I dont want to post it as a web job because the script has some references to the file in local disk of my VM. Could some one tell me the options available to run this solution in batch?


Solution

  • According to your description , I provide you with several ways as below to run your solution in batch.

    1.Web Job

    Actually , you can package Python script-dependent modules or references together and send them to webjob. Then you can find their absolute path on the KUDU and refer to them in your script, so this does not affect your use of webjob. For this process you can refer to the case I used to answer :Python libraries on Web Job.

    Please note that Web Job can be executed per second at least.

    2.Azure Scheduler

    Azure Scheduler allows you to declaratively describe actions to run in the cloud. It then schedules and runs those actions automatically. You can periodically call your app script url. More details , please refer to the official tutorial. Please note that Azure Scheduler can be executed per minute at least.

    3.Azure Functions

    Like the previous method , you can use Azure functions timer trigger to periodically call your app script url. More details , please refer to the official tutorial.

    4.Azure Batch

    Azure Batch schedules compute-intensive work to run on a managed collection of virtual machines, and can automatically scale compute resources to meet the needs of your jobs.Considering that Azure Batch is used in large data operations, the cost of combining your situation is relatively high and I don't suggesting you use.More details , please refer to the official tutorial.

    Hope it helps you.