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 » Sat Oct 05, 2019 5:00 am

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: 504
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Node shutdown after task complete

Post by timurhai » Wed Oct 09, 2019 3:04 pm

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 2.4.0, Ubuntu 18.04 LTS, 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 » Thu Oct 10, 2019 7:05 am

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: 504
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Node shutdown after task complete

Post by timurhai » Thu Oct 10, 2019 9:35 am

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 2.4.0, Ubuntu 18.04 LTS, 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 » Thu Oct 10, 2019 9:37 am

I want to shutdown the node after it finishes its task. So Task done > shutdown.

User avatar
timurhai
Site Admin
Posts: 504
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Node shutdown after task complete

Post by timurhai » Thu Oct 10, 2019 10:19 am

You can change task command to:

Code: Select all

do_some_work && shutdown -P
Timur Hairulin
CGRU 2.4.0, Ubuntu 18.04 LTS, 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 » Thu Oct 10, 2019 10:55 am

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

Who is online

Users browsing this forum: No registered users and 0 guests