Bonjour,
je vous soumets le problème suivant (qui normalement n'en cause aucun!) car je n'arrive pas à faire fonctionner cron.d sur ma F25 LXDE fraîchement installée .
L'état des choses:
- selinux disabled (pour les tests)
- un fichier "date" de test
# ls -l /etc/cron.d
total 16
-rw-r--r--. 1 root root 128 23 août 15:50 0hourly
-rw-r--r-- 1 root root 72 11 déc. 15:40 date
-rw-r--r--. 1 root root 108 12 août 21:12 raid-check
- contenu du fichier "date" qui devrait m'entrer toutes les minutes la date actuelle dans le fichier "dates":
*/1 * * * * root /usr/bin/date >> /home/e-smith/files/users/arnaud/dates
- "root /usr/bin/date >> /home/e-smith/files/users/arnaud/dates" entré dans un terminal me rentre bien la date actuelle dans mon fichier ~/dates
- status de crond.services:
# systemctl status crond.service
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since dim. 2016-12-11 15:35:36 CET; 25min ago
Main PID: 2084 (crond)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/crond.service
└─2084 /usr/sbin/crond -n
déc. 11 15:35:36 fedora-compaq.guedel.eu systemd[1]: Stopping Command Scheduler...
déc. 11 15:35:36 fedora-compaq.guedel.eu systemd[1]: Stopped Command Scheduler.
déc. 11 15:35:36 fedora-compaq.guedel.eu systemd[1]: Started Command Scheduler.
déc. 11 15:35:36 fedora-compaq.guedel.eu crond[2084]: (CRON) INFO (Syslog will be used instead of sendmail.)
déc. 11 15:35:36 fedora-compaq.guedel.eu crond[2084]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 78% if used.)
déc. 11 15:35:36 fedora-compaq.guedel.eu crond[2084]: (CRON) INFO (running with inotify support)
déc. 11 15:35:36 fedora-compaq.guedel.eu crond[2084]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
déc. 11 15:41:01 fedora-compaq.guedel.eu crond[2084]: (*system*) RELOAD (/etc/cron.d/date)
déc. 11 16:01:01 fedora-compaq.guedel.eu CROND[3044]: (root) CMD (run-parts /etc/cron.hourly)
avant-dernière ligne: on y voit bien mon fichier /etc/cron.d/date.
- le fichier /var/log/cron ne m'indique rien de plus:
Dec 11 15:29:44 fedora-compaq crond[1548]: (CRON) INFO (Shutting down)
Dec 11 15:29:44 fedora-compaq crond[1913]: (CRON) INFO (Syslog will be used instead of sendmail.)
Dec 11 15:29:44 fedora-compaq crond[1913]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 81% if used.)
Dec 11 15:29:44 fedora-compaq crond[1913]: (CRON) INFO (running with inotify support)
Dec 11 15:29:44 fedora-compaq crond[1913]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Dec 11 15:35:36 fedora-compaq crond[1913]: (CRON) INFO (Shutting down)
Dec 11 15:35:36 fedora-compaq crond[2084]: (CRON) INFO (Syslog will be used instead of sendmail.)
Dec 11 15:35:36 fedora-compaq crond[2084]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 78% if used.)
Dec 11 15:35:36 fedora-compaq crond[2084]: (CRON) INFO (running with inotify support)
Dec 11 15:35:36 fedora-compaq crond[2084]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Dec 11 15:41:01 fedora-compaq crond[2084]: (*system*) RELOAD (/etc/cron.d/date)
Dec 11 16:01:01 fedora-compaq CROND[3044]: (root) CMD (run-parts /etc/cron.hourly)
Dec 11 16:01:01 fedora-compaq run-parts[3044]: (/etc/cron.hourly) starting 0anacron
Dec 11 16:01:01 fedora-compaq run-parts[3044]: (/etc/cron.hourly) finished 0anacron
- mon fichier /etc/crontab semble OK
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# 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,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
- Je sais que le contenu de mon fichier /etc/cron.d/date a fonctionné sans problème sous F24
Et c'est là que je bute depuis ce matin. Idem sur ma VM de test.
==> questions:
- le "(*system*) RELOAD" dans le retour de commande status, est-ce normal?
- que puis-je tester d'autre pour trouver l'erreur?
Merci.
@+
Arnaud