# Own time interval for updating the blocklist

**URL:** <https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026>\
**Category:** Feature Requests\
**Tags:** blocklists\
**Created:** [March 23, 2023, 8:25pm UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026 "2023-03-23T20:25:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafal](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rafal/32/34450_2.png) [@Rafal](https://discourse.pi-hole.net/u/Rafal)\
**Post date:** [March 23, 2023, 8:25pm UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/1 "2023-03-23T20:25:02Z")

</div>

At the moment our blocklist updates once a week, is it possible to add an option to have one(or more) of the items added to the blocklist update more frequently? Custom value is welcome. I ask this because we have an institution in PL that issues warnings and manages its own list of unsafe domains their list is updated very often[1], they claim every 5 minutes. It would be useful for my parents. They are elderly people and you never know what they will click on.

1.The address of the site of the institution I am talking about referring directly to the list of malicious domains, the page in Polish  
([Lista ostrzeżeń przed niebezpiecznymi stronami | CERT Polska](https://cert.pl/posts/2020/03/ostrzezenia_phishing/))

1. Said list: [https://hole.cert.pl/domains/domains.txt](https://hole.cert.pl/domains/domains.txt)

---

<div class="post-metadata">

**Author:** ![chrislph](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/chrislph/32/32723_2.png) [@chrislph](https://discourse.pi-hole.net/u/chrislph)\
**Post date:** [March 24, 2023, 4:00am UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/2 "2023-03-24T04:00:50Z")

</div>

Schedule the command `pihole -g` to run as needed using [cron](https://pimylifeup.com/cron-jobs-and-crontab/).

> ```auto
> Usage: pihole [options]
> -g, updateGravity Update the list of ad-serving domains
> ```

---

<div class="post-metadata">

**Author:** ![Rafal](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rafal/32/34450_2.png) [@Rafal](https://discourse.pi-hole.net/u/Rafal)\
**Post date:** [March 24, 2023, 9:07am UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/3 "2023-03-24T09:07:35Z")

</div>

I know that i can use cron for such things, but i just want to update one source more often and  
I don't want to get in the way of a cron entry that pihole created

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [March 24, 2023, 11:08am UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/4 "2023-03-24T11:08:55Z")

</div>

> [@Rafal](#):
>
> I ask this because we have an institution in PL that issues warnings and manages its own list of unsafe domains their list is updated very often[1], they claim every 5 minutes.

I'd strongly recommend against updating it every five minutes.  
That would result in `pihole-FTL` restarting every five minutes, which may give you short micro periods of DNS outages in those intervals.  
Depending on the size of that list, it could also result in starting the next update process before the previous had a chance to finish, which could grind your system to a halt.

---

<div class="post-metadata">

**Author:** ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)\
**Post date:** [March 24, 2023, 11:20am UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/5 "2023-03-24T11:20:09Z")

</div>

> [@Rafal](#):
>
> I ask this because we have an institution in PL that issues warnings and manages its own list of unsafe domains their list is updated very often[1], they claim every 5 minutes.

If your using unbound, you could consider implementing this list as an unbound RPZ zone. Either ask that institution to make the list available in RPZ format OR download the list "as is" and convert it to RPZ format, using a bash script, storing the result in the pihole web server (/var/www/html), than configure unbound to retrieve the zone from htttp://127.0.0.1/....

An example of an RPZ zone, which updates very frequently (multiple times per day) can be found [here](https://urlhaus.abuse.ch/downloads/rpz)

How to setup RPZ zones (with unbound in a pi-hole environment) can be found in [this](https://jpgpi250.github.io/piholemanual/doc/Unbound%20response%20policy%20zones.pdf) manual.

---

<div class="post-metadata">

**Author:** ![Rafal](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rafal/32/34450_2.png) [@Rafal](https://discourse.pi-hole.net/u/Rafal)\
**Post date:** [March 24, 2023, 3:14pm UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/7 "2023-03-24T15:14:08Z")

</div>

I had not planned to do so, opting rather for an update once a day.

---

<div class="post-metadata">

**Author:** ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)\
**Post date:** [March 24, 2023, 7:49pm UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/8 "2023-03-24T19:49:45Z")

</div>

> [@Rafal](#):
>
> opting rather for an update once a day

If you want to achieve this:

- open /etc/cron.d/pihole and copy the line (line 21 ?) that has the word (filename) **pihole\_updateGravity.log** in it (twice).
- create a new file /etc/cron.d/extragravityupdates
- enter the copied line in the new file. and change **\* \* 7** into **\* \* 1-6** (don't change anything else), only in the new file, don't change the original.
- make sure there is an **extra linefeed** behind that line, or it won't work)
- save the new file

The regular pihole cron (overwritten when you update) will still execute on sunday, the additional file ensures the gravity update runs on all other days (monday .. saturday).  
Using a separate file ensures a pihole update (pihole -up) doesn't undo your additional config.  
Be aware this will update all lists, not just the one you mentioned earlier.

---

<div class="post-metadata">

**Author:** ![Rafal](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rafal/32/34450_2.png) [@Rafal](https://discourse.pi-hole.net/u/Rafal)\
**Post date:** [March 25, 2023, 10:37am UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/9 "2023-03-25T10:37:12Z")

</div>

Sounds like a plan and i will do it, but we are in "Feature requests" section 🙂

---

<div class="post-metadata">

**Author:** ![rdwebdesign](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rdwebdesign/32/51363_2.png) [@rdwebdesign](https://discourse.pi-hole.net/u/rdwebdesign)\
**Post date:** [March 25, 2023, 7:18pm UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/10 "2023-03-25T19:18:25Z")

</div>

> [@Rafal](#):
>
> but we are in "Feature requests" section

You are correct, but normally a Feature Request needs some votes from other users to be considered as a candidate for development.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [September 21, 2023, 7:18pm UTC](https://discourse.pi-hole.net/t/own-time-interval-for-updating-the-blocklist/62026/11 "2023-09-21T19:18:52Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
