Do you want the script to start at start-up or at logon? These are very different moments. For example: I have Pi's to which I seldom logon.
So, you've looked at rc.local, and it doesn't work. The rc.local way is as follows:
Make sure /etc/systemd/system/rc-local.service exists and contains something like:
Reading the comments to @joan's answer, it occurs to me that you might be open to "Low Power" in lieu of "Zero Power".
If that's the case, and your RPi model is 4B you can reduce the current draw to about 35-40 mA (200mW) by changing a couple of configuration variables in your EEPROM bootcode. See this answer for details.
You can schedule ...
You can't use a script running on the Pi to switch the Pi on when off. I leave it to you to work out why a script will not work if the Pi is not powered.
You need an external device to switch the power on.
Why do you need to switch the power on and off? You could use a script to reboot the Pi.