Auto update Gravity database

I looked and was surprised there was no feature request for this already

It would be nice if in command line and web portal for you to have gravity automatically update at the user set time schedule

Mostly just a thought I had after a bit of using the software and noticing the ad lists getting longer even after an hour of not updating gravity

Thank you for your consideration

This is exactly how pi-hole updates gravity, once a week.

Pi-hole already uses a cron job to update gravity (/etc/cron.d/pihole).

The time for this job is set on installation, but you can change when the job runs to meet your own requirements.

1 Like

oh, thank you

To add more detail, gravity updates weekly between 0300 and 0500 your local time.

Each Pi-hole install is assigned a randomly chosen time within this interval. This is done to reduce the peak load on adlist servers. If every Pi-hole hit the servers at the same time, that could cause problems.

There is very little need to update gravity more frequently than weekly. But, even if you do, if the adlist server provides the proper update header, Pi-hole won't download a list that hasn't changed. Instead, Pi-hole will use a locally cached copy. This is done to minimize data traffic from the adlist servers.