Vai al contenuto

sthutdown -r oppure -h dopo tot secondi


Messaggi raccomandati

Salve,

 

domanda certamente semplice ma dato che non sono riuscito a trovare la risposta chiedo qui.

 

Ho l'esigenza di impostare il comando

do shell script "shutdown -r orario" password "xxx" with administrator privileges

là dove orario è

set orario to (time string of ((current date) + 5))

che restituisce l'ora corrente più 5 secondi.

Il problema è che il comando  non accetta questo formato ed io non so come inserire il ritardo in secondi. gli esempi che ho trovato si riferiscono a minuti od ore.

 

Qualcuno sa come fare?

 

Grazie.

Link al commento
Condividi su altri siti

dubito che si possa fare.

 

dal man del comando shutdown:

Cita

 time    Time is the time at which shutdown will bring the system down and
             may be the word now (indicating an immediate shutdown) or specify
             a future time in one of two formats: +number, or yymmddhhmm,
             where the year, month, and day may be defaulted to the current
             system values.  The first form brings the system down in number
             minutes and the second at the absolute time specified.


come vedi, l'unità di tempo minima è il minuto.

 

Cioè: o imponi lo spegnimento immediato, oppure lo ritardi di 60 secondi. Critico?

Link al commento
Condividi su altri siti

Archiviato

Questa discussione è archiviata e chiusa a future risposte.

×
×
  • Crea Nuovo...