Automatisch uitvoeren van scripts onder Linux

Uit Nl Ikoula wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

nl:Automatisch uitvoeren van scripts onder Linux he:הפעל אוטומטית את קבצי ה-script תחת לינוקס ro:Rula automat script-uri sub Linux ru:Автоматически запускать скрипты под Linux pl:Automatycznie uruchamiać skrypty pod Linuksem ja:Linux のスクリプトを自動的に実行します。 ar:تلقائياً بتشغيل البرامج النصية تحت لينكس zh:自动运行在 Linux 下的脚本 de:Automatische Ausführung von Skripten unter Linux it:Eseguire automaticamente script sotto Linux pt:Automaticamente executar scripts no Linux es:Ejecutar automáticamente secuencias de comandos en Linux en:Automatically run scripts under Linux fr:Exécuter automatiquement des scripts sous Linux

Dit artikel is vertaald door middel van automatische vertalingssoftware. U kunt het artikel bron hier te bekijken.

Problematisch

U wilt kunnen bellen Linux commando's en scripts automatisch, sommige dagen of uren.

Oplossing

Maken van regels cron om het systeem van opdrachten uit te voeren en de tijd of de schakeltijd.

Dan moet u eerst controleren of uw script is kundig voor stormloop opdrachtregel.


Vervolgens gewoon invoegen in het bestand /etc/crontab, het pad naar het script en de uren van handhaving.

Hier is de samenstelling van een lijn cron: [minute] [heure] [jour du mois] [mois] [jour de la semaine] [commande à lancer]

Voorbeelden


#Programmation du reboot soft tous les Lundi, Mardi, Jeudi, Samedi a 6h30
30 6 * * 1,2,4,6 root reboot

#Programmation d'un script http appelé toutes les minutes
*/1 * * * * root GET http://votre-domaine.com/test.php



U mag niet reageren.