Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1050 connectés 

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Probleme de cron

n°934031
coolben
http://www.starbusiness.fr
Posté le 14-07-2007 à 15:27:20  profilanswer
 

Bonjour
 
J'ai un petit problème avec Cron.
Le fonctionnement me parait pourtant simple mais je ne comprend pas pourquoi une commande que j'ai rajouter dans /etc/cron.d/awstats ne fonctione pas.  
Voici le fichier en question (/etc/cron.d/awstats):  

Citation :

#0,10,20,30,40,50 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
0,10,20,30,40,50 * * * * root [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] /home/coolben/awstats.sh >/dev/null


voila le resultat dans la log :

Citation :

Jul 14 15:20:01 localhost /USR/SBIN/CRON[485]: (root) CMD ([ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] /home/coolben/awstats.sh >/dev/null)
Jul 14 15:20:01 localhost /USR/SBIN/CRON[484]: (root) MAIL (mailed 32 bytes of output but got status 0x004e )


 
Bizarre ???

mood
Publicité
Posté le 14-07-2007 à 15:27:20  profilanswer
 

n°934070
fighting_f​alcon
Posté le 14-07-2007 à 18:18:47  profilanswer
 

déjà ta syntaxe est fausse ...
0,10,20,30,40,50 * * * * root [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && /home/coolben/awstats.sh >/dev/null
 
ensuite, il faut savoir que cron met en place son propre environnement, minimaliste ... il y a donc un PATH mais qui ne contient pas grand chose, et que très peu de variables d'environnement. Il faut donc propablement que tu en définisses toi même pour que ça marche ..


Message édité par fighting_falcon le 14-07-2007 à 18:19:13
n°934138
coolben
http://www.starbusiness.fr
Posté le 14-07-2007 à 23:53:32  profilanswer
 

merci
 
c'est bon ca fonctionne  


Aller à :
Ajouter une réponse
 

Sujets relatifs
Problème Cron & StreamripperProbleme avec Cron : Stopper l'envoi de mails
probleme de cronCron / webmin: probleme d'execution
rsync [resolu] nouveau probleme avec cronProblème de cron avec Webmin
probleme de cronProbleme avec Cron
Probleme avec MRTG et cron : process deja lancéProblème avec cron et la reconnection auto de mon modem
Plus de sujets relatifs à : Probleme de cron


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR