Node shutdown after task complete

General discussions and questions.
Post Reply
Des
Posts: 4
Joined: Sat Oct 05, 2019 4:56 am

Node shutdown after task complete

Post 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
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Node shutdown after task complete

Post 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.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Des
Posts: 4
Joined: Sat Oct 05, 2019 4:56 am

Re: Node shutdown after task complete

Post 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!
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Node shutdown after task complete

Post 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?
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Des
Posts: 4
Joined: Sat Oct 05, 2019 4:56 am

Re: Node shutdown after task complete

Post by Des »

I want to shutdown the node after it finishes its task. So Task done > shutdown.
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Node shutdown after task complete

Post by timurhai »

You can change task command to:

Code: Select all

do_some_work && shutdown -P
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Des
Posts: 4
Joined: Sat Oct 05, 2019 4:56 am

Re: Node shutdown after task complete

Post 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!
Post Reply