Page 1 sur 1

[cron] Ne marche pas...

Publié : mar. 13 déc. 2022, 16:44
par Sylvain_68
Bonjour,

Désolé mais j'ai encore besoin de vos lumières... J'ai du mal à faire fonctionner cron sur mon petit serveur Manjaro.

J'ai bien installé cronie, puis je l'ai activé (systemctl enable cronie)

J'ai renseigné les tâches avec crontab -e, ce qui donne crontab -l:

Code : Tout sélectionner

# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=mon.mail@orange.fr

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,>
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
40 16   * * *   root    cd / && run-parts --report /etc/cron.daily
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
Les jobs prévus se lancer quotidiennement(/etc/cron.daily) sont :

Code : Tout sélectionner

-rw-r--r-- 1 sylvain sylvain  268 15 avril  2022 00logwatch
-rw-r--r-- 1 sylvain sylvain 2211 15 avril  2022 locate
-rw-r--r-- 1 sylvain sylvain  377 15 avril  2022 logrotate
-rw-r--r-- 1 sylvain sylvain 1123 15 avril  2022 man-db
Mais à l'heure dite rien ne se passe. Je ne reçois rien.

Pourtant crond est bien lancé...

Code : Tout sélectionner

ps aux | grep crond
root       62167  0.0  0.0   6708  2956 ?        Ss   16:38   0:00 /usr/bin/crond -n
Que se passe-t-il ?

Re: [cron] Ne marche pas...

Publié : mar. 13 déc. 2022, 19:25
par benjarobin
Bonjour, as tu bien suivi viewtopic.php?p=178568#p178568 ?
Tu ne dois pas avoir FromLineOverride=yes
Et tu dois avoir bien configuré revaliases avec tous les utilisateurs pouvant envoyer un email. Je ne sais pas avec quel utilisateur cronie envoi un email
Ta ligne hostname me semble fausse... Cela devrait être orange.fr

Re: [cron] Ne marche pas...

Publié : mer. 14 déc. 2022, 12:42
par Sylvain_68
Bonjour,

Merci beaucoup pour ton aide, j'apprécie beaucoup !

L'envoi de courriel marche maintenant très bien. J'ai tout de même modifié hostname et ça marche aussi.

J'ai programmé hier soir une exécution de logwatch, j'ai eu le rapport 40 minutes plus tard.

Ce matin j'ai ajouté /etc/cron.d/0daily et la programmation a marché. J'espère que ça va durer. Je te dirai ça demain matin.

Sylvain

Re: [cron] Ne marche pas...

Publié : jeu. 15 déc. 2022, 13:01
par Sylvain_68
Bonjour,

La programmation du matin a bien fonctionné. Problème réglé.
Jusqu'au prochain.. Je suis un peu fatigué de me prendre les pieds dans le tapis à chaque fois que j'essaye quelque chose...