Stopping multiple workers after current tasks using deadlinecommand

Hello,

We have multiple worker instance running on some of our hosts and I am looking for a way to stop them after their current tasks completion.

As example, we got workerA-01 workerA-02 workerA-03 workerA-04 all running on the workerA machine. From deadline monitor I can select them and use Stop worker after current task completion in the context menu. I am trying to do the same using deadlinecommand RemoteControl but “OnLastTaskComplete StopSlave” doesn’t seem to care about the worker name I pass.

deadlinecommand RemoteControl workerA OnLastTaskComplete StopSlave workerA-01 workerA-02 workerA-03 workerA-04

I also tried to send them command to a single worker but I understand it’s expecting the machine name so it’s not working wither.

deadlinecommand RemoteControl workerA-01 OnLastTaskComplete StopSlave
"could not resolve Worker name (workerA-01) to IP address. The machine may not exist on the network."

There’s no extra argument documented for “OnLastTaskComplete StopSlave” here:
https://docs.thinkboxsoftware.com/products/deadline/10.3/1_User%20Manual/manual/command-line-arguments-clients.html?highlight=remotecontrol#remotecontrol

So I’m wondering how’s Deadline Monitor doing it and is there any way to do that using deadlinecommand?

Thanks in advance!

Looks like a limitation of deadlinecommand.

StopSlave does not take any arguments to specify worker instance.

If you use just

deadlinecommand -RemoteControl workerA OnLastTaskComplete StopSlave

it will apply it to all worker instances.

Why do you want to stop the slave after it renders an individual task?

On, the actual worker, there is also

deadlineworker -name workerA-01 -aftertask StopSlave

maybe you could use

deadlinecommand -RemoteControl workerA Execute “”

in repo options/client setup/remote control you would need to allow all remote commands.

Not sure if it that will work. I never really use deadlinecommand as there are so many event triggers to hook into…