Installer crontab sur CentOS

Installer crontab sur CentOS

crontabPour installer crontab sur CenOS il doit juste y avoir un paquet installé.

Voir dessous la commande d’installation crontab.

Utilisez cette commande pour installer crontab, Démarrer le démon cron et activé le démarrage automatique.

 

# yum -y install vixie-cron.x86_64
# /sbin/service crond start
# /sbin/chkconfig crond on

# Définition:
# .—————- minute (0 – 59)
# |  .————- heure (0 – 23)
# |  |  .———– jour du mois (1 – 31)
# |  |  |  .——— Mois (1 – 12) OR jan,feb,mar,apr …
# |  |  |  |  .—- jour de la semaine (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |

Pour édité :

# crontab -e

 

# syncro de l’heure avec ntpdate tous les jours à 2h00:

0 2 * * * /usr/sbin/ntpdate -s -b -p 8 -u 2.centos.pool.ntp.org

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée.

* Copy This Password *

* Type Or Paste Password Here *