Wifi on/off via cmdline?

Hi,
what might be the best Solution to switch on/off the wifi on a raspperry 4 without creating problems for OS Dietpi?

I need to switch off the wifi during night time.

Thank you

you could try following command to bring down/start WiFi interface

ifdown wlan0
ifup wlan0

Yeah,
works,
thank you