Page 1 of 1

Node shutdown after task complete

Posted: Sat Oct 05, 2019 5:00 am
by Des
Hi Tim!
Great afanasy!

Question:
I want to be able to shutdown node after task completes, not job but task. What should i configure for it work?

Thanks

Re: Node shutdown after task complete

Posted: Wed Oct 09, 2019 3:04 pm
by timurhai
Hi!

There is no such feature "out-of-the-box".
Afanasy can't automatically shut down render node after a job or a task completes.

Re: Node shutdown after task complete

Posted: Thu Oct 10, 2019 7:05 am
by Des
Ok, i understand.
What should i look for, where could i inject a shell script in the task submitting with python?
I read there is cmd task or so, could i put there the execution of node shutdown? does it execute after the task is done (frame finished)?
Thanks!

Re: Node shutdown after task complete

Posted: Thu Oct 10, 2019 9:35 am
by timurhai
It depends on your needs.

You want to create some job, that will run some command on each machine only once, than node should be shutdown?

You want to ask render some node (from GUI or API) to shutdown after the current running task will be finished?

Re: Node shutdown after task complete

Posted: Thu Oct 10, 2019 9:37 am
by Des
I want to shutdown the node after it finishes its task. So Task done > shutdown.

Re: Node shutdown after task complete

Posted: Thu Oct 10, 2019 10:19 am
by timurhai
You can change task command to:

Code: Select all

do_some_work && shutdown -P

Re: Node shutdown after task complete

Posted: Thu Oct 10, 2019 10:55 am
by Des
ok, so basicly in python i will just add at the end of the cmd the shutdown cmd and it will pass.
clever. i never thoutght about that. +100 for you mister T. :) thanks alot for the tip

edit:
ive already setup the render user as able to execeute shutdown, so good good tip!