automatic shut down the PC after ending of run
Hi
is there a script or utility so that turn off the computer after end of run automatically?:) |
Hi,
in case you're doing single serial runs a simple Code:
sudo shutdown now cutter |
Hi
I want a complete script that turn off the PC when the run ended automatically not manual. then please let me know in parallel cases. |
Oh sorry,
what I meant is running your simulation like this Code:
$SOLVER && sudo shutdown now |
Greetings to all!
@cutter: Sorry, but I think you forgot that sudo will ask for the password after several minutes of not having used sudo. So, no, that won't work :( In addition, the "&&" implies that the command on the right to it should only be executed if the one on the left finished with success, which might not be the case. It would be a bit annoying if the solver crashed after 30min of falling asleep and the computer stayed on all night :( WARNING: The following instructions can lead to accidental shutdowns, and respective consequences, when they are not intended! Therefore, use these instructions at your own risk!
Bruno |
Hi Bruno thanks
I didn't grasp how to use the command exactly.for example :"rhoCentralFoam && shutdown +5" is true or not use &&? like: "rhoCentralFoam shutdown +5" |
Quote:
Code:
blockMesh |
it mean that I have to open another terminal when run is doing in the folder of case and type in it:shutdown +5 ?
then 5 minutes after finishing of the run the PC will be turned off?! ---------------- I knew what you mean! I have to add this to the script that use for the run,right? if its so,then Code:
rhoCentralFoam shutdown +5 |
:confused: Uhm, no.
I guess you're not inspired to work on this today... In my previous example, the respective script would be: Code:
#!/bin/sh |
Bruno I use this:
Code:
#!/bin/bash like: Code:
#!/bin/bash |
hi Bruno
It didn't turn off,i tested in two times.it goes to a state like hibernate in windows but remains ON. |
Hi Ehsan,
I'll quote myself: Quote:
Quote:
Best regards, Bruno |
Hi Bruno,
then I haven't read that carefully:( then this should be correct so that it shut down,right? Code:
#!/bin/bash |
OK, if I have to detail every step, here goes :mad::
|
thanks Bruno,
but the last run is working and ends this morning,I have to get up earlier! then shutdown doesn't mean power off?and "halt" is a state like sleep(or such thing) in windows?whats the benefit of "halt"?! it surely helps some year later I hope ! :) |
Hi dear Bruno
shutdown -h and -P worked and powered off the PC,but -H option didn't(only the page with Ubuntu logo shown),is there any preference in using -h or -P options or isn't? |
Quote:
|
http://www.cfd-online.com/Forums/ope...tml#post449033
dear Bruno,may using shutdown had been causing the problem of lost data? #11: Quote:
|
Hi Ehsan,
Quote:
Quote:
In addition, you used the shutdown command, which should be recent enough and should always go through all of the necessary steps for a safe shut-down. The "-h" and the "-P" options are usually the same thing in some systems, since the "-h" is the generic option for "either halt or power down, whichever the system can handle". Neither one should use a forceful shut-down. From my search, I found the following details:
Therefore, the big remaining questions, based on this, are:
Bruno |
Hi dear Bruno,
thanks for nice information and searching, 1-at that time I had a Windows 7 on a partition. 2-I was in Ubuntu and face to lack of space,then moved all files to a NTFS partition, some minutes later I wanted to go to that partition,but it took a long time think of 3-4 minutes and the partition didn't open,then I restarted the PC and when it turned on I saw that that partition doesn't open and instead shows an error message that was saying something about the partition is unmounted(I saw it in Windows and all things was deleted,even in Windows it was showing a message that this partition is corrupted,... I clearly remember),... I remember this was the starting of trouble,then I brought the internal hard(I hadn't any external hard at that time) to the shop and after some days go and come lastly I returned it back to home happily that noticed the partition that was after it has been deleted like previous and after that it was the linux turn,...and other things that you know. 3-now I don't think it was because of shutdown command,because this was aroubd one week or ten days that whenever I wanted to open a huge folder on NTFS partitions(they were data partitions,not XP or 7 partitions) it seemed the PC was becoming locked,even mouse didn't move and this was taking around 1 minute and suddenly it was waking up from a sleep and was continuing to work. at those days I had very stress and wanted to resolve the problem and didn't track the probable causes. |
All times are GMT -4. The time now is 00:13. |