crond: automatischer Shutdown

Moritz

Moritz

Life is hard and so am I
Hallo zusammen!

Wie schaffe ich es, dass mein crond den Rechner automatisch Montags bis Freitags um 2:30 (AM) ausschaltet?

Grüße,
Moritz
 
als Root den Befehl 'crontab -e ausführen', vorher solltest du noch mit hilfe von 'which shutdown' herausfinden wo der befehl shutdown genau liegt. Die genauen Parameter zum herunterfahren deines rechners bekommst du in der Manpage von shutdown (man shutdown).

in deiner Crontab erzeugst du dann folgende zeile
30 2 * * 1,2,3,4,5 /usr/sbin/shutdown -h now

[add] hab das -h vergessen :) [/add]
 
unter root "crontab -e" und dort dann die Zeile:

Code:
30 2 * * *  shutdown -h now

http://www.nerc-online.com/support/www/crontab.html schrieb:
Format
minute hour day month weekday command

Minute - Minutes after the hour (0-59).
Hour - 24-hour format (0-23).
Day - Day of the month (1-31).
Month - Month of the year (1-12).
Weekday - Day of the week. (0-6; the 0 refers to Sunday).

Asterisks (*) specify when commands are to be run in every instance of the value of the field. For instance, an asterisk in the Month field would mean that the command should be run every month. In addition, multiple events can be scheduled within a field by separating all instances with commas - with no space between.

// Edit:
Jo, Hopfe war schneller und den Wochentag hab ich auch noch vergessen.

// Edit2:
Aber dafür hatte ich das h drin *G*. Evtl. gehts halt auch ohne Pfad.

Havoc][
 
Zuletzt bearbeitet:
@Moritz - Du hast noch kein Linux installiert und fragst sowas ? ;)

Verschoben !
 
Danke an alle! (Und vor allem für Antworten ohne RTFM! :D )

redlabour schrieb:
@Moritz - Du hast noch kein Linux installiert und fragst sowas ? ;)

Verschoben !
Für mich gehört sowas zu Basiskonfiguration..... :rolleyes: Aber die Kategorien von Unixboard sind eh zu verwirrend für mich....
 

Ähnliche Themen

Datenträgerfrage: Automatische Datensicherung beim Laptop

Keine grafische Oberfläche (Debian Installation)

2 Gateways - ein Netz. Verständnisfrage

CentOS 5.8 –SQL Abfrage– HTML wird generiert und daraus müssen mehrere Mails versendet werden

Crontab und Scripts - Problem

Zurück
Oben