Pihole APi to Set up Rules via CLI?

Hey There, is it possible to set up some settings about CLI ?

Goal:
Im using a "block all" regex and i want set up this rule to some clients between 21:00 and 06:00.
Is that Possible ?

You can create a Pi-hole Group, add the desired devices to this group and also add the regex.

Then you can enable or disable the group to block/allow the devices.

You can use a cron job to enable/disable the group, using SQL. You also need to run pihole restartdns reload-lists after the SQL command.

Something like this: