Probleme avec Cron

Forum dédié aux questions concernant la configuration de votre serveur sous Linux
deennoo
Messages : 4036
Inscription : 25 janv. 2015, 02:00

Probleme avec Cron

Message par deennoo »

Bonjour a tous,

Je rencontre un probleme avec cron.

voici mon fichier :

Sudo crontab -e

Code : Tout sélectionner

# m h  dom mon dow   command
*/5 * * * * node /home/pi/domoticz/scripts/js/telewifi.js >/dev/null 2>&1
*/59 * * * * /home/pi/domoticz/scripts/php/./pluie1h.php >/dev/null 2>&1
* */3 * * * /home/pi/domoticz/scripts/php/./previsiondemain.php >/dev/null 2>&1
* /6 * * * /home/pi/domoticz/scripts/php/./previsiontoday.php >/dev/null 2>&1
00 1 * * * /home/pi/domoticz/scripts/shell/./fete.sh >/dev/null 2>&1
*/5 * * * * /home/pi/domoticz/scripts/shell/./freebox_infosvpn.sh >/dev/null 2>&1
00 1 * * * /home/pi/domoticz/scripts/shell/./saison.sh >/dev/null 2>&1
*/5 * * * * /home/pi/domoticz/scripts/shell/./updatewu.sh >/dev/null 2>&1
* */6 * * * /home/pi/domoticz/scripts/python/./recupvigi.py 33 >/dev/null 2>&1
* */6 * * * /home/pi/domoticz/scripts/python/./recupflowerpower.py >/dev/null 2>&1
* */1 * * * /home/pi/domoticz/scripts/perl/aiq-lcsqa.pl >/dev/null 2>&1
00 3 * * * /home/pi/domoticz/scripts/php/./moustique.php >/dev/null 2>&1
00 3 * * * /home/pi/domoticz/scripts/php/./pollens.php >/dev/null 2>&1
#* */1 * * * sudo sh /home/pi/python-webkit2png/./dashboardcapture.sh >/dev/null 2>&1
*/5 * * * * /home/pi/domoticz/scripts/shell/./testwifi.sh >/dev/null 2>&1
* */1 * * * /home/pi/domoticz/scripts/shell/./Pluie1h.sh >/dev/null 2>&1
Le probleme est que certains scripts s'execute toutes les minutes au lieu de s'executer aux intervalles voulue.

Par exemple le script de vigilance meteo qui doit s'executer toutes les 6h me donne ceci dans les log domoticz :
Capture6.PNG
Capture6.PNG (215.71 Kio) Consulté 3485 fois
et en faisant un TOP cela ce confirme :

Code : Tout sélectionner

 6623 root      20   0 12532 9804 3724 R  45.2  1.0   0:01.37 aiq-lcsqa.pl
 6625 root      20   0 15532  12m 6300 S  33.0  1.3   0:01.00 recupflowerpowe
 6624 root      20   0 14964  11m 6116 S  26.4  1.2   0:00.80 recupvigi.py
 6640 root      20   0 34748  10m 6804 S  21.1  1.0   0:00.64 node
 2288 root      20   0  331m  20m  10m S   7.3  2.1  95:38.66 domoticz
 6619 root      20   0 40224  14m  11m S   5.6  1.4   0:00.17 previsiondemain
 2947 root      39  19 19224 8652 2980 S   3.0  0.9   0:49.78 rpimonitord
  281 root      20   0     0    0    0 S   1.6  0.0   0:37.46 w1_bus_master1
 6620 root      20   0  4364 2744 2500 S   1.3  0.3   0:00.04 freebox_infosvp
 6644 root      20   0  9788 4508 4004 S   1.3  0.5   0:00.04 curl
 6568 pi        20   0  4800 2584 2140 R   1.0  0.3   0:00.07 top
 6601 root      20   0  8456 4848 4288 S   1.0  0.5   0:00.03 curl
 6678 root      20   0  9788 4412 3916 S   1.0  0.4   0:00.03 curl
30207 root      20   0     0    0    0 S   1.0  0.0   0:07.21 kworker/u8:3
 1929 root      20   0 29012 2440 2120 S   0.7  0.2   0:02.79 rsyslogd
 2209 root      20   0  3836 1936 1732 S   0.7  0.2   0:00.57 cron
 6612 root      20   0  5104 2304 1964 S   0.7  0.2   0:00.02 cron
 6618 root      20   0  4276 2492 2336 S   0.7  0.2   0:00.02 Pluie1h.sh
18721 root      20   0     0    0    0 D   0.7  0.0   0:01.06 kworker/u8:1
29155 root      20   0     0    0    0 S   0.7  0.0   0:16.02 kworker/u8:0
    7 root      20   0     0    0    0 S   0.3  0.0   0:27.42 rcu_preempt
   16 root      20   0     0    0    0 S   0.3  0.0   0:00.23 ksoftirqd/2
   53 root      20   0     0    0    0 D   0.3  0.0   0:05.43 mmcqd/0
 2137 mosquitt  20   0  5896 4552 3224 S   0.3  0.5   0:07.39 mosquitto
 2496 root      20   0     0    0    0 S   0.3  0.0   0:00.20 kworker/2:0
 2667 mysql     20   0  308m  36m 8932 S   0.3  3.7   0:13.74 mysqld
 6604 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6605 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6606 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6607 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6608 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6609 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6610 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6611 root      20   0  5104 2304 1964 S   0.3  0.2   0:00.01 cron
 6622 root      20   0  1772  348  296 S   0.3  0.0   0:00.01 sh
 6639 root      20   0  4280 2372 2244 S   0.3  0.2   0:00.01 updatewu.sh
 6645 root      20   0  2444  480  412 S   0.3  0.0   0:00.01 jq
Une idée du probleme ?
De quoi se faire Plaisir et essayer d'aider...
http://www.domo-attitude.fr
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: Probleme avec Cron

Message par vil1driver »

Salut,

manque un * avant /6 ici

Code : Tout sélectionner

* /6 * * * /home/pi/domoticz/scripts/php/./previsiontoday.php >/dev/null 2>&1
sinon c'est quoi ce chemin :o enlève ce ./ que tu as mis partout

et accessoirement indiquer le chemin de l'utilitaire également, exemple:

Code : Tout sélectionner

* */6 * * * /usr/local/bin/php /home/pi/domoticz/scripts/php/previsiontoday.php >/dev/null 2>&1
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
deennoo
Messages : 4036
Inscription : 25 janv. 2015, 02:00

Re: Probleme avec Cron

Message par deennoo »

Bon bah tout résolut en mettant le * manquand, les chemin complet et en enlevant le ./
De quoi se faire Plaisir et essayer d'aider...
http://www.domo-attitude.fr
Répondre