Animation and Visual Effects Forum

Technical => Maya => Autodesk => Rendering => Topic started by: rowan on August 06, 2010, 05:13:16 PM

Title: Command line rendering log off and shutdown
Post by: rowan on August 06, 2010, 05:13:16 PM
Hi guys,

So I did a little research into various commands you can add to your batch rendering scripts. A couple of really handy ones are the logoff and shutdown flags. It's probably a good habit to get into, that way people know when the computers done rendering because you'll be conveniently logged out, it's also good for classes the next morning if the computers entirely shut off.

The command is simple enough just add;
LOGOFF
at the end of your script or;
SHUTDOWN -s
the -s flag denotes an immediate shutdown, you can also use -t x where x represents a value in seconds before the computer shuts down.

<3 Rowan
Title: Re: Command line rendering log off and shutdown
Post by: Patrick M on August 06, 2010, 10:54:06 PM
I would double check if you are able to run these from the Command prompt, may be restricted for security reasons.  I dont think they are but they may require a higher level account to run it from that environment.

You can also perform some logging of start and finish times of sections etc.  Command Prompt is very powerful if you know how to use it.  If anyone gets stuck give me a yell.

Also for shutdown you can use the -r for restart. And for those that remember the blaster virus/trojan from a few years back will easily identify the dialogbox that appears when using the shutdown -s -t 60 command
Title: Re: Command line rendering log off and shutdown
Post by: rowan on August 07, 2010, 10:43:42 AM
And for those that remember the blaster virus/trojan from a few years back will easily identify the dialogbox that appears when using the shutdown -s -t 60 command

I had that exact thought, we got that virus when I was about 14 or so, it was bad... I'll check to see that these commands work next time I'm in the labs and report back. Actually on that subject Pat, I want to save the render log somewhere as a text document, that is to say everything the cmd prints during the course of rendering, I looked it up but struggled to find anything, is this possible?

<3 Rowan
Title: Re: Command line rendering log off and shutdown
Post by: Patrick M on August 07, 2010, 11:44:58 AM
Theres a built in flag for render:

-log <log filename>

Give that a go.

But you may want everything that command outputs not just what -log wants you to know... so maybe try adding this

> somefile.txt

to end of your command.   '>' outputs everything that command does to a file, in this case a .txt files.  Not too sure if this will break 'render'.

Title: Re: Command line rendering log off and shutdown
Post by: rowan on August 07, 2010, 12:19:05 PM
Cool thanks man I'll give it a go.

<3 Rowan