I try to run this cron job but goaccess can not creat the report,
*/2 * * * * goaccess access.log -a > report.html
although when i run this command from my ssh it works fine
Mostly due to missing path entries when run via crond.
Chech which is the full path of goaccess: which goaccess
You'll get something like: /usr/local/bin/goaccess
In your cron line use the full path above instead of just goaccess.
*/2 * * * * /usr/local/bin/goaccess access.log -a > report.html
Thank you. it works now
Most helpful comment
Mostly due to missing path entries when run via crond.
Chech which is the full path of goaccess:
which goaccessYou'll get something like:
/usr/local/bin/goaccessIn your cron line use the full path above instead of just
goaccess.*/2 * * * * /usr/local/bin/goaccess access.log -a > report.html