Will this cronjob work?

I've created a cronjob as a root user to take care of updating my pi-hole and it's block list. Would this cronjob work or do I need to improve it?

# m h  dom mon dow   command
0 0 * * 0 pihole -up
0 3 * * * pihole -g

Don't do this.

(1) Pi-hole already updates gravity weekly between 0300 and 0500 your local time in Sunday morning. The output of this unattended run is stored in directory /var/log so you can review it later if desired.

(2) Unattended updates to Pi-hole are unwise. We write release notes for each new release, and you should read these prior to updating. Some updates are breaking and you don't want to wake up to a version with features that you don't want and from which you cannot revert. Or to find that it just won't work on your OS, etc.

1 Like

Ah okay thanks for the input. I was just worried that my pi-hole would become unsecured if I didn't check for updates constantly.

The web GUI will notify you of available updates.

1 Like

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