I'm running pi-hole as a docker container based on this registry: https://hub.docker.com/r/pihole/pihole
In the documentation, regarding updating Ad Lists, it reads:
Automatic Ad List Updates - since the 3.0+ release,
cronis baked into the container and will grab the newest versions of your lists and flush your logs. Set your TZ environment variable to make sure the midnight log rotation syncs up with your timezone's midnight.
While the logs are flushed weekly, the adlists are only updated weekly. I wanted a way to update the adllists every day at 6 am via cron.
Later on in the documentation, it also notes that the command to update the gravity db using the command line is as follows:
docker exec pihole_container_name pihole updateGravity
I SSH into my Raspberry Pi and run the command:
I then added the following line:
0 6 * * * docker exec Pihole pihole updateGravity
Again, Pihole is the name of my docker image. If your docker image is called something else then you substitute that name in the above.
So, when you're done, you'll have a way to update the gravity DB daily and twice on one day of the week (since a weekly update is already built in).