Automatically turn off your PC Windows 10 set time set scheduled, time

Automatically shut down your PC at a scheduled time, Windows 10

Read in: IT 🇮🇹   EN 🇺🇸

It can happen that, sometimes, you forget the PC turned on and remain in operation throughout the night. In this article, we see how to automatically shut down your PC at a scheduled time, setting up Windows 10 appropriately.

Subscribe my YouTube channel ValorosoIT. Retro technology, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

Let's also see how to avoid and cancel automatic shutdown se, all'orario impostato per lo spegnimento, stessimo ancora lavorando sul computer.

Command shutdown to shut down the computer

Iniziamo con un po' di teoria. Per arrestare il computer, utilizziamo il comando shutdown. The syntax that we analyze, for the command shutdown, is as follows:

shutdown /s /f /t 600 /c "Messaggio personalizzato!"

where:

  • l'opzione /s indicates to turn off the computer (there are also other options for restarting and disconnecting the computer, but they are not relevant to our purpose);
  • /f forza la chiusura di tutte le applicazioni - attenzione: si potrebbero perdere dei dati se non abbiamo salvato il nostro lavoro prima di abbandonare il computer! Windows applica l'opzione /f, automatically, if it is indicated a time later /t;
  • /t consente di impostare un tempo, in secondi, trascorso il quale il computer viene spento automaticamente (nell'esempio, 600 secondi corrispondono a 10 minuti);
  • /c it gives the ability to customize the computer shutdown message.

E' possibile fare una prova del comando shutdown, at the command prompt. From Boot menu, start the Command Prompt, which is located in Windows system.

Windows 10 boot menu Windows System CMD Command Prompt

from the window that opens type the shutdown, with all the options listed above.

Automatically turn off the PC Windows 10 set time, shutdown /s /f /t /c -s -f -t -c

Windows mostra il messaggio di avvertimento personalizzato e il computer si spegne dopo 10 minuti dall'esecuzione del comando.

Automatically turn off your Windows 10 PC now set, shutdown s f t c blue message you are about to be disconnected

Alcune applicazioni, che supportano la funzionalità, permettono di recuperare automaticamente il documento non salvato al momento dell'arresto del sistema.

Automatically shut down your PC at a scheduled time

But how do you automatically turn off your PC at a scheduled time, for example at 22:30?

Follow me on Instagram channel. Retro technology, Commodore, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

E' molto semplice. Per spegnere automaticamente il computer ad un'ora impostata, bisogna includere il comando shutdown, con tutte le opzioni sopra indicate, all'interno dell'Scheduler.

From the Boot menu, avviare l'Scheduler, which is located in Windows administration tools.

Windows 10 Start menu, Scheduling Utility, Windows Administrative Tools

Impostare un'attività nell'Scheduler to turn off the computer at a set time

Per spegnere automaticamente il computer all'ora stabilita, bisogna creare una nuova attività. Dalla finestra dell'Scheduler, we click on Create activities.

Utility scheduling Windows 10, Create new task, Automatically turn off the PC Windows 10 set time, automatically turn off the computer at a set scheduled time defined

A new window opens: Create activities. Assegnare un nome all'attività, ad esempio: "Spegnimento automatico del computer". Selezionare l'opzione: Run regardless of users' connection. Infatti, lo spegnimento automatico del computer all'orario impostato, deve avvenire indipendentemente dal fatto che ci siamo dimenticati la sessione aperta, oppure che ci si trovi disconnessi.

Windows 10 Scheduling Utility, General, Name, Run Regardless of Users' Connection

We set the trigger condition of our planned action. Click on the table Activation, then click New.

Windows 10 scheduling utility, Create task, Activate, New, turn off the computer at a set scheduled time defined set set

From the window New activation, impostiamo l'orario in cui spegnere automaticamente il PC. Come data di inizio, inserire il giorno corrente. Selezionare l'opzione Daily. Sincerarsi che l'operazione pianificata sia attivata: deve essere spuntato il checkbox Activated. To confirm, you can press the Ok.

Windows 10 scheduling utility, Create task, Activation, New daily activation time date time activated

Dalla tabella, possiamo quindi verificare che l'attività sia stata pianificata correttamente. Non dobbiamo premere Ok, in questa finestra, bensì proseguire ad impostare le altre tabelle dell'attività.

Utility scheduling Windows 10, Create task, Activation, Summary of activation details every day turn off pc now set scheduled defined, turn off the computer automatically

We enter the command shutdown nell'Scheduler

We click on Actions, then click New.

Schedule utility Windows 10, Create task, Actions, New, Task, Automatically turn off your PC at a set time

The new action we set is the command itself shutdown. From the menu OperationChoose Program start. Next, we type shutdown in the text field Program or script. All the arguments and options that we have listed before, must be entered in the Add arguments (optional). For our goal, i.e. automatically turn off the PC at a scheduled time, the arguments are mandatory, and not optional.

To avoid typing mistakes, you can copy/paste texts.

Program or script:

shutdown

Add arguments:

Follow me on Instagram channel. Retro technology, Commodore, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

/s /f /t 600 /c "Il computer sta per essere arrestato. Utilizzare l'icona sul desktop per annullare lo spegnimento!"

Press Ok to confirm the data just entered.

Schedule utility Windows 10, Create task, Actions, New task, shutdown program or script, add arguments, automatically turn off the PC at a set time, computer, scheduled time, set time

Dalla tabella, possiamo quindi verificare che l'azione sia stata inserita correttamente. Anche qui, non dobbiamo premere Ok, bensì proseguire ad impostare le altre tabelle dell'attività.

Windows 10 Scheduling Utility, Create Task, Actions, Task Summary Details

Automatically turn off the PC at a scheduled time: if we were still working?

We click on the table Conditions. The first option from which we must remove the check is: Avvia l'attività solo se il computer è alimentato da rete elettrica. In fact, if we are using a laptop, we would like it to turn off automatically even (and above all) if it is battery powered.

In addition, we can indicate to turn off the computer only if the computer has been idle for 10 minutes (or from a settable time). If we were working, the computer would wait for the idle state even for 1 hour (this time is also settable) before turning off automatically. To automatically turn off the computer at a set time, only if the computer is idle, click on: Avvia l'attività solo se il computer è inattivo.

Utility scheduling Windows 10, Create task, Conditions, Start the task only if the computer is idle for, only if the computer is powered by mains, turn off the computer automatically if you do not use it

If, on the other hand, we still want to turn off the computer regardless of the state of use (remember that later I will explain how to create an icon on the desktop to cancel the automatic shutdown of the PC), we remove the check from: Avvia l'attività solo se il computer è inattivo.

Automatically turn off the PC at a set scheduled time defined set, Conditions, Start the activity only if the computer is idle for, only if the computer is powered by mains

Again, we don't click on Ok, but let's continue on the next table: Settings. Uncheck: Stop if done for longer. Finally we can press Ok to save our planned task!

Windows 10 scheduling utility, Create task, Settings, Stop if followed for further, allow on-demand task execution

Può essere che il computer richieda l'immissione della password. Digitare la password dell'utente e cliccare su Ok.

Windows 10 scheduling utility, Create new task, Enter administrator password

Ottimo! L'operazione pianificata per spegnere automaticamente il computer ad un certo orario impostato, è ora attiva e funzionante. La potete trovare cliccando su Task Scheduler Library, along with other tasks that are already scheduled.

Follow me on Instagram channel. Retro technology, Commodore, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

Automatically turn off the PC at a set time, scheduled tasks, schedule utility libretia

Modificare o Eliminare l'attività di spegnimento automatico del PC ad un'ora impostata

Se cambiate idea e volete cancellare le impostazioni appena effettuate, non c'è problema. Potete eliminare l'operazione pianificata per lo spegnimento automatico del computer. Cliccando su Task Scheduler Library, trovate, nell'elenco, l'attività che abbiamo appena impostato.

Through the right mouse button, we can decide to click on Property, per modificare l'attività, piuttosto che su Elimination to delete it.

Automatically turn off the PC at a set scheduled time, scheduled tasks, schedule utility libretia, property, delete action

The same commands Property and Remove, sono disponibili in basso a destra. La modifica delle proprietà dell'operazione pianificata può essere utile, ad esempio, per cambiare l'orario settato per spegnere automaticamente il computer.

Automatically turn off the PC at a scheduled time: the test!

Per effettuare una prova, potete tranquillamente impostare un orario di spegnimento entro una decina di minuti dall'orario attuale. Tenete anche conto che, se avete impostato di non spegnere il PC se lo state ancora utilizzando, dovrete programmare un orario più lontano.

Raggiunto l'orario programmato, trascorsi i 10 minuti in cui possiamo cambiare idea (impostati con l'opzione 600 /t in command shutdown) the computer shows the shutdown screen. This is the shutdown screen of the computer when you are disconnected.

Automatically turn off the Windows 10 PC now set defined scheduled, shutdown of the computer being disconnected.jpg

This, on the other hand, is the shutdown screen if you are logged in to your account.

Automatically turn off the PC Windows 10 now set scheduled defined set, blue message you are about to be disconnected

Evitare lo spegnimento automatico del computer all'ora impostata

Vediamo ora il comando per annullare lo spegnimento automatico del computer, qualora l'Scheduler avesse già avviato l'attività.

The command to type to cancel the automatic shutdown of the computer is:

Subscribe my YouTube channel ValorosoIT. Retro technology, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

shutdown /a

From the Command Prompt, you can try the shutdown /a after typing the power off command.

shutdown to how to cancel the shutdown of the pc computer Windows 10, shutdown /a -a, cmd command prompt

Possiamo creare un'icona sul desktop, contenente il programma per annullare lo spegnimento automatico del computer all'ora impostata. Cliccando con il tasto destro del mouse su una parte libera del desktop, selezionare New and then Connection.

How to create a new shortcut on the Windows 10 desktop

The window opens to create a new link. In the text box Enter the path for the link, type the command:

shutdown /a

Then continue, by clicking on Forward.

Cancel avoid turning off the computer shutdown / a -a create a shortcut on the desktop

Digitare il nome che vogliamo assegnare al collegamento, ad esempio: "Annulla spegnimento PC". Infine, cliccare su Fine.

Cancel, avoid shutting down computer shutdown -a /a creates a shortcut on the desktop, enter the name of the shortcut

Ecco il collegamento creato sul nostro desktop! Qualora il computer volesse spegnersi automaticamente all'orario programmato, abbiamo 10 minuti per premere questo collegamento ed annullare l'arresto automatico.

By clicking on the new link with the right mouse button, we can view the Property. Da questa finestra, possiamo anche cambiare l'icona al collegamento.

Cancel avoid shutting down computer shutdown /a -a shortcut property on the desktop, change shortcut icon

In conclusion

We learned how to use the command shutdown to turn off the computer.

Follow me on Instagram channel. Retro technology, Commodore, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

Next, we saw how to bind the command shutdown to scheduled tasks, to automatically turn off the PC at a scheduled time.

Finally, we have seen how to cancel the automatic shutdown of the computer.

Surely, we will no longer forget the computer turned on all night!

Subscribe my YouTube channel ValorosoIT. Retro technology, vintage audio, retro computers, experiments and tests. Retroprogramming, Basic. Commodore, IBM, Atari, Apple, Texas Instruments, Amstrad, MSX.

Posted in Computers and Technology, All articles.

Leave a Reply

Your email address will not be published. Required fields are marked *