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é.
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é.
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é.
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:
:~$ [ -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 ?
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 ?
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:
:~$ [ -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 ?
* */1 * * * [ -z "$(/usr/bin/pgrep -f mon_script.sh)" ] &&
/home/contact/mon_script.sh
* */1 * * * [ -z "$(/usr/bin/pgrep -f mon_script.sh)" ] &&
/home/contact/mon_script.sh
* */1 * * * [ -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 ?
alors, mon_script.sh démarre bien.
Quelqu'un a une idée de mon erreur ?
alors, mon_script.sh démarre bien.
Quelqu'un a une idée de mon erreur ?
renome ton fichier et ton cron en retirant l'extension (.sh)
renome ton fichier et ton cron en retirant l'extension (.sh)
renome ton fichier et ton cron en retirant l'extension (.sh)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 15/10/2011 13:40, Grégory Bulot a écrit :
> renome ton fichier et ton cron en retirant l'extension (.sh)
Intérêt ?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 15/10/2011 13:40, Grégory Bulot a écrit :
> renome ton fichier et ton cron en retirant l'extension (.sh)
Intérêt ?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 15/10/2011 13:40, Grégory Bulot a écrit :
> renome ton fichier et ton cron en retirant l'extension (.sh)
Intérêt ?
essaye tu verras avec extension le fichier mon_script.sh n'est pas
exécuté, mon_script lui le sera
essaye tu verras avec extension le fichier mon_script.sh n'est pas
exécuté, mon_script lui le sera
essaye tu verras avec extension le fichier mon_script.sh n'est pas
exécuté, mon_script lui le sera
@jean-yves
tu m'as fais espérer car lorsque j'ai remplacé le && par le if then fi,
le script s'est lancé. Sauf qu'il se lançait à chaque heur e, le test ne
faisait plus son boulot.
@jean-yves
tu m'as fais espérer car lorsque j'ai remplacé le && par le if then fi,
le script s'est lancé. Sauf qu'il se lançait à chaque heur e, le test ne
faisait plus son boulot.
@jean-yves
tu m'as fais espérer car lorsque j'ai remplacé le && par le if then fi,
le script s'est lancé. Sauf qu'il se lançait à chaque heur e, le test ne
faisait plus son boulot.