goaccess在定时任务中不执行的问题
2016-08-03 00:00
309 查看
When a task is run within cron, stdin is closed. Programs that act differently based on whether stdin is available or not will behave differently between the shell session and in cron.
An example is the program
and
The fix for
An example is the program
goaccessfor analysing web server log files. This does NOT work in cron:
goaccess -a -f /var/log/nginx/access.log > output.html
and
goaccessshows the help page instead of creating the report. In the shell this can be reproduced with
goaccess -a -f /var/log/nginx/access.log > output.html < /dev/null
The fix for
goaccessis to make it read the log from stdin instead of reading from the file, so the solution is to change the crontab entry to
cat /var/log/nginx/access.log | goaccess -a > output.html
相关文章推荐
- spring quartz 定时任务执行两次的问题
- 解决Spring定时计划任务重复执行两次或多次(实例被构造两次)问题的方法
- linux定时任务生产java服务无法执行问题群友案例 【转】
- crontab定时任务Java程序不执行问题
- Tomcat启动后加载两次web.xml的问题(因为spring定时任务执行了俩次,引出此问题)
- 定时任务执行git clone出现permission denied(publickey)问题的解决
- linux定时任务生产java服务无法执行问题
- 解决Spring定时计划任务重复执行两次(实例被构造两次)问题的方法
- 解决Spring定时计划任务重复执行两次(实例被构造两次)问题的方法
- SSM集成Quartz定时任务 重复执行问题
- Timer对象执行定时任务只执行一次的问题
- crontab linux 定时任务不执行问题
- 解决spring quartz定时任务执行2次的问题
- 解决Spring定时计划任务重复执行两次(实例被构造两次)问题的方法
- spring quartz 定时任务同时间执行2次的问题
- 关于spring的quartz(定时任务执行)问题,
- 关于crontab定时任务执行失败发送报错邮件的问题
- 解决Spring定时计划任务重复执行两次(实例被构造两次)问题的方法
- linux crontab 定时任务被重复执行多次问题
- Linux定时任务没有执行问题分析与总结