Activate group with cron

for me this is only necessary :smiley:

in ssh
edit the crontab

crontab -e

and past this rows : (0 min, 9am, all days, all month, only the week)

#Enable Block:
0 9 * * 1-5  sudo sqlite3 /etc/pihole/gravity.db "update 'group' set 'enabled'=1 where name='Enfants_cours';" ; /usr/local/bin/pihole restartdns reload-lists >/dev/null
#Disable Block:
0 18 * * 1-5  sudo sqlite3 /etc/pihole/gravity.db "update 'group' set 'enabled'=0 where name='Enfants_cours';" ; /usr/local/bin/pihole restartdns reload-lists >/dev/null

2 Likes