自动运行在 Linux 下的脚本

来自Chinese 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.

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

这篇文章是从由软件进行自动翻译。你可以看到这篇文章的源代码

有问题

你想要能够调用 Linux 命令和脚本自动,一些天数或小时数。

解决方案

创建规则 cron 通知的时间或开关时间运行的命令的系统。

首先,您需要验证您的脚本能够运行的命令行。


然后只需在文件中插入 /etc/crontab, 对脚本和执法的时间路径。

这里是一条线组成 cron: [minute] [heure] [jour du mois] [mois] [jour de la semaine] [commande à lancer]

例子


#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



您未被允许发表评论。