Once I set up logwatch, and I needed to set up sending logs not daily, but once a week.
I opened the config in a text editor:
sudo nano /etc/logwatch/conf/logwatch.conf
And he indicated the period for which the logs should be collected:
Range = between -7 days and -1 days
I also moved the task to run once a week:
sudo mv /etc/cron.daily/00logwatch /etc/cron.weekly/
I ran logwatch manually to check:
sudo /etc/cron.weekly/00logwatch
And got the error:
ERROR: Range ‘between -7 days and -1 days’ not understood
This error occurred because the perl module Date::Manip was not installed, so to solve the error I ran in Ubuntu:
sudo apt update
sudo apt install libdate-manip-perl
You can also install it like this:
cpan -i 'Date::Manip'
perl -MCPAN -e 'install Date::Manip'
See also my article:
Installing and configuring Logwatch