help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Computer shut down from within Octave?


From: Carnë Draug
Subject: Re: Computer shut down from within Octave?
Date: Thu, 4 Oct 2012 18:18:16 +0200

On 4 October 2012 17:50, babelproofreader <address@hidden> wrote:
> Is this possible? For example, if I want to run some script overnight while
> sleeping and I'm not sure exactly how long it will take, is there some
> command from within Octave that can be sent to the computer system to shut
> down the computer after the script has finished running? My motivation is
> simply that if the script stops at say 2 am I don't want the computer to be
> on unnecessarily for perhaps another 4 or 5 hours.

Not tested but I think adding the command

system ("shutdown -h now")

to the end of your script should do it.

Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]