Pular para o conteúdo

Weathermap não roda no cron

Responder tópico
  • Denunciar
  • Indicar

1. Weathermap não roda no cron

Enviado em 29/11/2011 - 16:12h

Boa tarde galera,

Vejam se podem me ajudar, o plugin Weathermap do CACTI não roda no cron, se eu ir pelo terminal ele roda ok colocando os arquivos e imagens em /var/www/html com o nome index.html tudo certim, tanto como usuario ou outro.
No cron coloquei o caminho certo e nada já tentei diversas permições e configuração.

*/1 * * * * php /var/www/html/cacti/plugins/weathermap/weathermap --config /var/www/html/cacti/plugins/weathermap/configs/simple.conf

*/1 * * * * php /var/www/html/cacti/plugins/weathermap/weathermap --config configs/simple.conf

*/1 * * * * apache php /var/www/html/cacti/plugins/weathermap/weathermap --config /var/www/html/cacti/plugins/weathermap/configs/simple.conf

*/1 * * * * apache php /var/www/html/cacti/plugins/weathermap/weathermap --config configs/simple.conf

Alguém pode me ajudar?

Obrigado.

Responder tópico

2. Re: Weathermap não roda no cron

Enviado em 29/11/2011 - 16:25h

e nos logs do cron qual seria o erro ?

3. Weathermap não roda no cron

Enviado em 29/11/2011 - 16:42h

Aparentemente ok

Nov 29 15:31:01 localhost crond[16491]: (apache) CMD (php /var/www/html/cacti/plugins/weathermap/weathermap --config /var/www/html/cacti/plugins/weathermap/configs/simple.conf)
Nov 29 15:31:01 localhost crond[16493]: (root) CMD (php /var/www/html/cacti/poller.php > /dev/null 2>&1)
Nov 29 15:32:01 localhost crond[16564]: (apache) CMD (php /var/www/html/cacti/plugins/weathermap/weathermap --config /var/www/html/cacti/plugins/weathermap/configs/simple.conf)

4. Re: Weathermap não roda no cron

Enviado em 29/11/2011 - 21:52h

Faz um teste, coloca esses comandos num arquivo script e agenda o script, veja se funciona.


#!/bin/bash
..comandos...
Dê permissão de execução:

$ chmod +x script.sh

Agende:

$ contrab -e

* * * * * /caminho/para/script.sh

Abraços

5. Re: Weathermap não roda no cron

Enviado em 30/11/2011 - 21:45h

Coloque o caminho absoluto do executável do php. Ex.:


*/1 * * * * /usr/bin/php /var/www/html/cacti/plugins/weathermap/weathermap --config /var/www/html/cacti/plugins/weathermap/configs/simple.conf

Responder tópico

Responder tópico

Entre na sua conta para responder.

Fazer login para responder