Cronjobs feitos via cronjob não funciona

1

Eu tenho o seguinte no meu cronjob -e :

00 17 * * 1-5 /home/jhvisser/bin/drive-at-five-record
00 18 * * 1-5 pkill rtmpdump
50 15 * * 1-5 /home/jhvisser/bin/z1035-no-commercial
55 16 * * 1-5 pkill rtmpdump

Olhando para o log cron, parece que os scripts deveriam ter sido executados, no entanto, nenhum arquivo foi criado como os trabalhos teriam feito.

Log:

Sep 26 07:39:01 jhvisser CRON[27399]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 07:44:01 jhvisser CRON[27459]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 08:09:01 jhvisser CRON[27639]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 08:39:01 jhvisser CRON[28010]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 08:44:01 jhvisser CRON[28100]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 09:09:01 jhvisser CRON[28498]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 09:39:01 jhvisser CRON[28732]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 09:44:01 jhvisser CRON[28802]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 10:09:01 jhvisser CRON[29066]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 10:39:01 jhvisser CRON[29300]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 10:44:01 jhvisser CRON[29355]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 11:09:01 jhvisser CRON[29537]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 11:39:01 jhvisser CRON[29767]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 11:44:01 jhvisser CRON[29826]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 12:09:01 jhvisser CRON[30004]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 12:39:01 jhvisser CRON[30230]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 12:44:01 jhvisser CRON[30288]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 13:09:01 jhvisser CRON[30495]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 13:39:01 jhvisser CRON[30747]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 13:44:01 jhvisser CRON[30806]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 14:09:01 jhvisser CRON[30987]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 14:39:01 jhvisser CRON[31239]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 14:44:01 jhvisser CRON[31300]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 15:09:01 jhvisser CRON[31678]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 15:39:01 jhvisser CRON[31938]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 15:44:01 jhvisser CRON[31996]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 15:50:01 jhvisser CRON[32027]: (jhvisser) CMD (/home/jhvisser/bin/z1035-no-commercial)
Sep 26 16:09:01 jhvisser CRON[32179]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 16:39:01 jhvisser CRON[32413]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 16:44:01 jhvisser CRON[32447]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 16:59:01 jhvisser CRON[32571]: (jhvisser) CMD (pkill rtmpdump)
Sep 26 17:00:01 jhvisser CRON[32578]: (jhvisser) CMD (/home/jhvisser/bin/drive-at-five-record)
Sep 26 17:09:01 jhvisser CRON[32652]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 17:39:01 jhvisser CRON[720]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Sep 26 17:44:01 jhvisser CRON[756]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
Sep 26 18:00:01 jhvisser CRON[910]: (jhvisser) CMD (pkill rtmpdump)
    
por ComputerLocus 27.09.2013 / 00:06

1 resposta

3

De acordo com os logs, o cron funcionou corretamente. Se os seus scripts devem estar criando arquivos, por favor verifique se seus arquivos são executáveis

ls -l /home/jhvisser/bin

Se eles forem executáveis, verifique se cada script começa com

#!/bin/bash
    
por Timothy Martin 27.09.2013 / 01:05