| View previous topic :: View next topic |
| Author |
Message |
bi-andrea Tux's lil' helper

Joined: 09 Mar 2010 Posts: 144 Location: cesenatico
|
Posted: Sat Feb 16, 2013 9:55 pm Post subject: uno script per l'autospegnimento |
|
|
Ciao a tutti, volevo impostare uno script dove a un'ora precisa si autospegne come se digitassi poweroff, poi caricarlo al boot così all'ora prefissata si spegne anche se non sno lì davanti.
come si può scrivere uno script del genere? _________________ Quando arrivi a Linux è un trauma, abituati a Windows, quando arrivi a Gentoo è uno spavento col brivido , però quando lo capisci sei uscito dall'università "GNU/Linux"  |
|
| Back to top |
|
 |
gutter Moderator


Joined: 13 Mar 2004 Posts: 7159 Location: Aarau, Aargau, Switzerland
|
Posted: Sun Feb 17, 2013 8:31 am Post subject: Re: uno script per l'autospegnimento |
|
|
| bi-andrea wrote: | Ciao a tutti, volevo impostare uno script dove a un'ora precisa si autospegne come se digitassi poweroff, poi caricarlo al boot così all'ora prefissata si spegne anche se non sno lì davanti.
come si può scrivere uno script del genere? |
Il comando shutdown ha la possibilità di fare ciò. Leggi la man page  _________________ Registered as User #281564 and Machines #163761 |
|
| Back to top |
|
 |
ago Developer


Joined: 01 Mar 2008 Posts: 1403 Location: Cosenza, Italy
|
|
| Back to top |
|
 |
djinnZ Advocate


Joined: 02 Nov 2006 Posts: 4500 Location: not so far from an evil, world famous volcano. Under dictatorship, property of banks...
|
Posted: Thu Feb 21, 2013 12:44 pm Post subject: |
|
|
vedo con piacere che siete sempre alle solite...
ma visto che sono rancoroso non spiego come al solito... _________________ verba et risus abundat in orae stultorum sed etiam semper severi insani sunt
mala tempora currunt... mater stultorum semper pregna est
Murpy'sLaw: If anything can go wrong, it will - O'Toole's Corollary: Murphy was an optimist |
|
| Back to top |
|
 |
doom555 n00b

Joined: 29 Oct 2012 Posts: 34
|
Posted: Mon Mar 25, 2013 5:54 pm Post subject: |
|
|
Credo che usare cron sia la soluzione migliore....
Invece la mia soluzione barbara che utilizzo in alcune situazioni in cui ho bisogno de spegnere il computer dopo un determinato periodo di tempo, ad esempio dopo un ora (3600 secondi) è:
| Code: | | # sleep 3600 ; init 0 |
(forse usare shutdown e passargli il corretto parametro di tempo sarebbe più appropriato ) |
|
| Back to top |
|
 |
codadilupo Advocate

Joined: 05 Aug 2003 Posts: 3134
|
Posted: Wed Apr 03, 2013 11:12 am Post subject: |
|
|
| djinnZ wrote: | vedo con piacere che siete sempre alle solite...
ma visto che sono rancoroso non spiego come al solito... |
standing ovation
Coda |
|
| Back to top |
|
 |
djinnZ Advocate


Joined: 02 Nov 2006 Posts: 4500 Location: not so far from an evil, world famous volcano. Under dictatorship, property of banks...
|
Posted: Tue May 21, 2013 1:44 pm Post subject: |
|
|
mah...
perchè sono tutti fissati con codesto cron? Mi domando solo questo. _________________ verba et risus abundat in orae stultorum sed etiam semper severi insani sunt
mala tempora currunt... mater stultorum semper pregna est
Murpy'sLaw: If anything can go wrong, it will - O'Toole's Corollary: Murphy was an optimist |
|
| Back to top |
|
 |
|