[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pb de shutdown avec anacron



Bonsoir,

j'ai déployé un serveur Debian Woody (image de début janvier) chez moi qui est sensé s'éteindre tout seul à minuit.

Pour cela, j'ai crée un script dodo.sh :
#!/bin/sh
shutdown -h now
ce script a les droits en execution.

j'ai crée un dossier cron.once où je l'ai placé.
Anacron est installé mais c'est là que je ne comprends plus :
nice run-parts --test /etc/cron.once
me renvoie vide, alors qu'il devrait lister dodo.sh normalement (ca fonctionne sur cron.daily).

mon 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
30      15      cron.monthly     nice run-parts --report /etc/cron.monthly
1       5       cron.once        nice run-parts --report /etc/cron.once

mon 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
25 6 * * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily 47 6 * * 7 root test -e /usr/sbin/anacron || run-parts --report /etc/cron.weekly 52 6 1 * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.monthly
59 23   * * *   root    /etc/cron.once/dodo.sh

Désolé pour la longueur mais j'essaie de donner le max d'infos.

Merci d'avance pour votre aide et de m'avoir lu :)




Reply to: