Poster une réponse à un sujet: [CRON] un peu bruyant...
Attention, ce sujet est un sujet ancien (6477 jours sans réponse)
zion
php pour virer les sessions: OUI
sinon dans 2 mois max ton site tournera plus
sinon dans 2 mois max ton site tournera plus

blietaer
de fait...
mrtg :
18:40/0 cmgtsrv1 /etc/cron.d # cat mrtg
*/5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi
php4
18:41/0 cmgtsrv1 /etc/cron.d # cat php4
# /etc/cron.d/php4: crontab fragment for php4
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php4/maxlifetime
# Look for and purge old sessions every 30 minutes
09,39 * * * * root [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm
php5
18:42/0 cmgtsrv1 /etc/cron.d # cat php5
# /etc/cron.d/php5: crontab fragment for php5
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php5/maxlifetime
# Look for and purge old sessions every 30 minutes
09,39 * * * * root [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm
Est-ce que tout cela est bien utile...?
mrtg :
18:40/0 cmgtsrv1 /etc/cron.d # cat mrtg
*/5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi
php4
18:41/0 cmgtsrv1 /etc/cron.d # cat php4
# /etc/cron.d/php4: crontab fragment for php4
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php4/maxlifetime
# Look for and purge old sessions every 30 minutes
09,39 * * * * root [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm
php5
18:42/0 cmgtsrv1 /etc/cron.d # cat php5
# /etc/cron.d/php5: crontab fragment for php5
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php5/maxlifetime
# Look for and purge old sessions every 30 minutes
09,39 * * * * root [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm
Est-ce que tout cela est bien utile...?
ovh

Clandestino
C'est c(r)on, ça...


max
ou affiche le

zion
lance le manuellement tu verras

blietaer

13:01/0 cmgtsrv1 /home/benoit # cd /etc/cron.d
13:01/0 cmgtsrv1 /etc/cron.d # ls
mrtg php4 php5
si?

max
crontab -l (pour listing) ou -e (pour editer) ne va jouer qu'au niveau de l'utilisateur (qu'il soit root ou pas).
J'irai bien jeter un oeil dans /etc/cron.d/ voir s'il n'y a pas un cacti qui traine
J'irai bien jeter un oeil dans /etc/cron.d/ voir s'il n'y a pas un cacti qui traine

blietaer
Un éditeur bleu avec le même contenu?

philfr
Et si tu fais crontab -e en tant que root ?