allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.53k stars 1.11k forks source link

Crontab #2712

Open kingleo216 opened 2 months ago

kingleo216 commented 2 months ago

Hi,

Does the report can put in cron? I have put script in bash script when it run at define time error show address already bind. I need kill the process and run it manually. Please advice.

Thanks,

allinurl commented 2 months ago

You can definitely run it via cron. However, if you need it to run in real-time, I’d recommend using --daemonize or running it through systemd. If it's just for generating reports at regular intervals, cron should work fine. Feel free to share the script, and I can take a look.

0bi-w6n-K3nobi commented 2 months ago

Hi @kingleo216

What is your real need? Is just batch processing, at CRON, and so again every day, or every specific time? Or real-time reporting ? ... About this you can read more at Features here.

If about is the first one, so do you need think about "build" a strategy for not re-entrant/nested running. Linux have a tools called timeout, but that just interrupt/break the running process. Maybe do you care for finish, so this no good enough for you. Another way, can just make a semaphore like touch lock and rm lock and so running batch only if lock file do not exit.