I want to run a containerized task on Azure Batch and I want execute the task using a schedule.
I have created a job schedule but how do I associated tasks or jobs to that job schedule. The only option inside the job schedule are Job manager task, Job preparation task and Job release task which are not what I want. I also dont see any option to choose the image as my actual task is based on container.
Any help is greatly appreciated
I want to run a containerized task on Azure Batch and I want execute the task using a schedule.
I have created a job schedule but how do I associated tasks or jobs to that job schedule. The only option inside the job schedule are Job manager task, Job preparation task and Job release task which are not what I want. I also dont see any option to choose the image as my actual task is based on container.
Any help is greatly appreciated
Share Improve this question edited Mar 20 at 16:11 Asfandyar Abbasi asked Mar 19 at 18:45 Asfandyar AbbasiAsfandyar Abbasi 852 gold badges2 silver badges10 bronze badges1 Answer
Reset to default 1Azure Batch Job schedules operate using job constructs, with the main concept being a job manager task.
A job manager task typically doesn't execute business logic/application code but instead creates tasks when the recurrence is fired for Batch to schedule on available nodes in the associated pool. This job manager task can be executed at the highest priority and can be excluded from spot nodes. You would need to code custom logic that calls back to the Azure Batch service using a user-assigned managed identity (UAMI) on the pool. With that being said, you can certainly have the job manager task execute your application directly, but you will utilize Batch in the least efficient manner and would only make sense for a single task on a single node with no ability to take advantage of horizontal scale of a Batch pool.
For an example, you can consult this blog post which uses the AzCLI. Note that the example in the blog post directly embeds credentials which is not a secure practice. You should instead use UAMI on the pool.