OVH Cloud OVH Cloud

question anacron

1 réponse
Avatar
Gabriel
bonsoir,
j'ai une ubuntu qui fonctionne impec si ce n'est le pb suivant que je ne
parviens pas à résoudre : les taches cron ne s'executent pas
automatiquement mais manuellement oui :



cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin

# These replace cron's entries
1 5 cron.daily nice run-parts --report /etc/cron.daily
7 10 cron.weekly nice run-parts --report /etc/cron.weekly
@monthly 15 cron.monthly nice run-parts --report
/etc/cron.monthly



cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root /bin/run-parts --report /etc/cron.hourly
11 20 * * * root test -x /usr/sbin/anacron || /bin/run-parts
--report /etc/cron.daily
30 20 * * 7 root test -x /usr/sbin/anacron || /bin/run-parts
--report /etc/cron.weekly
30 21 1 * * root test -x /usr/sbin/anacron || /bin/run-parts
--report /etc/cron.monthly


cron.daily ne s'execute pas par ex.

Si je fais : /bin/run-parts --report /etc/cron.daily alors il se lance.

J'en déduis que la clause précedente est fausse :

root@zeus:/var/log # ll /usr/sbin/anacron
-rwxr-xr-x 1 root root 23512 2004-11-26 12:36 /usr/sbin/anacron

et bien non, le fichier est bien executable !

Quelqu'un a une idée ?

Merci !

1 réponse

Avatar
Gabriel
re,

bon, j'ai trouvé :

les fichiers contenus dans les répertoires /etc/daily ... ne doivent pas
avoir d'extension.

bon we !