[HS] shell et environnement console versus CRON
salut la liste,
J'ai cherché la liste adéquate (shell french) pour poster mais je n'ai
rien trouvé. Alors si quelqu'un peu me re-redonner l'@ de ce NG. merci.
Sinon, voici mon petit soucis:
Dans la crontab de l'utilisateur contact, j'ai ceci:
* */1 * * * [ -z "$(/usr/bin/pgrep -f mon_script.sh)" ] &&
/home/contact/mon_script.sh
Ca doit lancer mon_script.sh s'il ne tourne pas déjà.
La crontab fait bien son boulot car je vois:
FA:~# grep mon_script.sh /var/log/syslog|tail -n 1
Oct 15 12:29:01 FA /USR/SBIN/CRON[2837]: (contact) CMD ([ -z
"$(/usr/bin/pgrep -f mon_script.sh)" ] && /home/contact/mon_script.sh)
Par contre, mon_script.sh n'est pas exécuté.
Lorsque j'exécute en console la même commande:
contact@FA:~$ [ -z "$(/usr/bin/pgrep -f mon_script.sh)" ] &&
/home/contact/mon_script.sh
alors, mon_script.sh démarre bien.
Quelqu'un a une idée de mon erreur ?
Merki!
f.
Reply to: