Batchpool - How to use job Manager task to "cleanup" after all tasks are completed?

SR-7559 141 Reputation points
2021-07-15T15:44:48.297+00:00

What's the best way to perform a one time activity (of say, sending an email) when a job is complete?

My understanding is that job release task runs once on each node where atleast 1 task was run (according to https://video2.skills-academy.com/en-us/azure/batch/batch-job-prep-release#job-release-task) and hence I'd not be able to use it.

What about Job Manager task? It certainly performs a 1 time 'init' activity (I can use it to submit all other regular tasks to the job). Thought I can use the same job manager task to run a 1-time cleanup activity per job? If not, what other option(s) do I have?

Thanks

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
330 questions
{count} votes

Accepted answer
  1. prmanhas-MSFT 17,901 Reputation points Microsoft Employee
    2021-07-20T16:27:54.027+00:00

    @SR-7559 Thank you for your patience over the matter!!!

    I had discussion internally and got below inputs from our internal team:

    I believe the options are:

    JobRelease which will have the effect of multiple emails as mentioned by you.
    TaskDependencies which is the simplest way with a task the depends on all the others.
    Have a JobManager task(or some other resource) poll the job and do something once complete.

    Hope it helps!!!

    Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.