Difference between revisions of "Automatically run scripts under Linux"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
Line 1: Line 1:
 +
<span data-link_translate_nl_title="Automatisch uitvoeren van scripts onder Linux"  data-link_translate_nl_url="Automatisch+uitvoeren+van+scripts+onder+Linux"></span>[[:nl:Automatisch uitvoeren van scripts onder Linux]][[nl:Automatisch uitvoeren van scripts onder Linux]]
 
<span data-link_translate_it_title="Eseguire automaticamente script sotto Linux"  data-link_translate_it_url="Eseguire+automaticamente+script+sotto+Linux"></span>[[:it:Eseguire automaticamente script sotto Linux]][[it:Eseguire automaticamente script sotto Linux]]
 
<span data-link_translate_it_title="Eseguire automaticamente script sotto Linux"  data-link_translate_it_url="Eseguire+automaticamente+script+sotto+Linux"></span>[[:it:Eseguire automaticamente script sotto Linux]][[it:Eseguire automaticamente script sotto Linux]]
 
<span data-link_translate_pt_title="Automaticamente executar scripts no Linux"  data-link_translate_pt_url="Automaticamente+executar+scripts+no+Linux"></span>[[:pt:Automaticamente executar scripts no Linux]][[pt:Automaticamente executar scripts no Linux]]
 
<span data-link_translate_pt_title="Automaticamente executar scripts no Linux"  data-link_translate_pt_url="Automaticamente+executar+scripts+no+Linux"></span>[[:pt:Automaticamente executar scripts no Linux]][[pt:Automaticamente executar scripts no Linux]]

Revision as of 20:13, 24 January 2016

nl:Automatisch uitvoeren van scripts onder Linux it:Eseguire automaticamente script sotto Linux pt:Automaticamente executar scripts no Linux es:Ejecutar automáticamente secuencias de comandos en Linux fr:Exécuter automatiquement des scripts sous Linux

This article has been created by an automatic translation software. You can view the article source here.

Problematic

You want to be able to call Linux commands, and scripts automatically, some days or hours.

Solution

Creating rules cron to inform the system of commands to run as well as the time or switching time.

You first need to verify that your script is able to run command line.


Then just insert in the file /etc/crontab, the path to the script and the hours of enforcement.

Here is the composition of a line cron: [minute] [heure] [jour du mois] [mois] [jour de la semaine] [commande à lancer]

Examples


#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



You are not allowed to post comments.