Le 26/11/06, jean tixier a écrit : > En fait si je ne veux plus d'anacron c'est qu'il se passe un truc > bizarre : > > J'ai modifié crontab en mettant les lancements des processus (daily, > weekly et mounthly) entre 19 h et 20 h. > J'ai vérifié, ils sont bien lancés. > Mais le lendemain quand je mets le pc sous tension au bout de > quelques minutes anacron démarre (comme avant) et lance les > procédures (en particulier msec qui dure 15/20 mn et qui "bouffe" 30% > du cpu). > > Bizarre, non ?
Oui, bizarre. Est-ce que le répertoire /var/spool/anacron existe bien avec des permissions correctes ? # cd /var/spool/ # ls -l | grep anacron drwxr-xr-x 2 root root 1024 nov 1 10:19 anacron/ # cd anacron/ # ls -l total 3 -rw------- 1 root root 9 nov 26 10:59 cron.daily -rw------- 1 root root 9 nov 1 10:34 cron.monthly -rw------- 1 root root 9 nov 22 18:25 cron.weekly (ces fichiers sont ceux où anacron marque la date de dernière exécution) Par ailleurs, les répertoires /etc/cron.daily, /etc/cron.weekly et /etc/cron.monthly doivent contenir un script 0anacron qui met à jour la date. Par exemple, pour cron.daily : # more 0anacron #!/bin/sh # # anacron's cron script # # This script updates anacron time stamps. It is called through run-parts # either by anacron itself or by cron. # # The script is called "0anacron" to assure that it will be executed # _before_ all other scripts. anacron -u cron.daily ## Dernière idée : que contient ta crontab ? S'agit-il bien d'un appel à run-parts comme ceci : # cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root nice -n 19 run-parts --report /etc/cron.hourly 02 4 * * * root nice -n 19 run-parts --report /etc/cron.daily 22 4 * * 0 root nice -n 19 run-parts --report /etc/cron.weekly 42 4 1 * * root nice -n 19 run-parts --report /etc/cron.monthly ## L'appel à run-parts a pour effet d'éxécuter tous les scripts du répertoire donné, et donc, normalement de mettre à jour le fichier dateur d'anacron, si tous les composants précédents sont là... -- Christophe http://ch4tn01r.free.fr/blog
========================================= Vous souhaitez acquerir votre pack ou des services Mandriva? Rendez-vous sur "http://store.mandriva.com". Rejoignez le club Mandriva : http://club.mandriva.com =========================================