I am trying to setup a shell script that creates goaccess reports with cron. When running the script manually it is working. I can see that the shell script is started via cron in cron.log.
Unfortunately something within the script is not working. Nothing is written to cron.log or a logfile that the crontask should write to
Any ideas what is wrong with this shell script for cron?
Code:
root@p:~ # more /etc/crontab
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD$
#
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
#
#minute hour mday month wday who command
51 * * * * root /root/create-goaccess-stats-hb.sh
Any ideas what is wrong with this shell script for cron?
Code:
#!/bin/sh
/usr/bin/more /usr/local/www/www-hb/logs/nx-access.log* | /usr/local/bin/goaccess - --log-format='%h %^[%d:%t %^]%^"%r" %s %b "%R" "%u" %^' --date-format=%d/%b/%Y --time-format=%T -o /var/data/www-hb-goaccess/index.html