1
I am following a tutorial from the site Super User of the network of Stack Exchange sites, with the idea of programming my computer to shut down by passing X
time, after we have run or double click on a file .bat
, instead of using a random program to do this.
As explained in the answer, first we have to create a batch file (.bat
) and inside it add the code below, just after the @echo off
:
shutdown -s -t 1800
which will shut down the computer after 30 minutes (1800 seconds) after running the file.
To cancel this action, just exchange the above code for the below code (or create a new file) and run it with the following code:
shutdown -a
So I created a Batch file and within it added the following line of code:
@ECHO OFF shutdown -s -t 1800
But when I run the file, nothing happens. Am I doing something wrong?
What do you mean the question is out of the scope? The question is about programming and even there are own tags related to the question and other questions asked on the same topic (
.bat/batch
) as an example: 1, 2, 3 and so on onward. Maybe it can be a less talked about topic that people aren’t used to seeing, but I don’t think it’s outside the scope.– Chun
I understood your point of view, but note that in the case of the questions you quoted, (in my view) only this within the scope, the others not. It doesn’t mean that because there are open questions that are within the scope, they usually pass "beaten" :) - I was the one who voted to close, but even so I tried to provide you with an answer, however looking well, your question really seems within the scope, because it speaks of . bat and not used commands, vote to close withdrawn and +1
– Guilherme Nascimento