Azure Batch jobs can be executed via code by using the Azure CLI (PowerShell scripts) or by using the Azure Batch .NET API.
In the following example, we'll learn how to use the Azure Batch .NET API to run an Azure Batch job that executes a custom application (.NET console application) in several cores simultaneously. We are assuming that you have previously done (as described in this book) the following:
- Created a Batch service account
- Created a storage account
- Copied a custom console application called MyApp (via the .exe and .config files) in to your Azure storage container (step 4 of the Creating an Azure Batch Service section)
To execute a Batch job, follow these steps:
- Open Visual Studio and create ...