[CRON] Problème de script
Résolu
bob031
Messages postés
8228
Statut
Membre
-
bob031 Messages postés 8228 Statut Membre -
bob031 Messages postés 8228 Statut Membre -
Bonjour,
Voici mon problème :
si je tape en ligne de commande ceci :
cela marche très bien !
maintenant je souhaite passer cette ligne de commande par cron :
je créé le fichier ci-dessous :
#!/bin/sh
/bin/find /var/lib/mysql/ -type f -name mysql-bin.0\* -mtime +3 -exec rm -f {} \;
je créé la tâche cron :
[root@localhost mysql]# crontab -l
#Variable accessible par crond (démon)
CRON_PATH=/home/zozo/Desktop/Mes_Scripts_Cron
# min(0-59) hours(0-23) day(1-31) month(1-12) dow(0-7) command
55 17 * * * $(CRON_PATH)/clrmysqlbin
[root@localhost mysql]
ben là ça marche plus !
Quelqu'un aurait une idée, svp ?
D'avance merci.
:-))
Voici mon problème :
si je tape en ligne de commande ceci :
find /var/lib/mysql/ -type f -name mysql-bin.0\* -mtime +3 -exec rm -f {} \;
cela marche très bien !
maintenant je souhaite passer cette ligne de commande par cron :
je créé le fichier ci-dessous :
#!/bin/sh
/bin/find /var/lib/mysql/ -type f -name mysql-bin.0\* -mtime +3 -exec rm -f {} \;
je créé la tâche cron :
[root@localhost mysql]# crontab -l
#Variable accessible par crond (démon)
CRON_PATH=/home/zozo/Desktop/Mes_Scripts_Cron
# min(0-59) hours(0-23) day(1-31) month(1-12) dow(0-7) command
55 17 * * * $(CRON_PATH)/clrmysqlbin
[root@localhost mysql]
ben là ça marche plus !
Quelqu'un aurait une idée, svp ?
D'avance merci.
:-))
Configuration: Linux Mandriva 2007 Firefox 2.0.0.1