DietPi allows you to change CPU govs on the fly in dietpi-config, automatically applied during boot: http://dietpi.com/
Also supports options for setting process priority (nice), and lots more "tweaky goodness".
If you dont want to try DietPi:
Create a service to run the command during boot. copy and paste all into term, then reboot:
Code:
cat << _EOF_ > /etc/systemd/system/cpuondemand.service
[Unit]
Description=cpuondemand
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
StandardOutput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
_EOF_
systemctl enable cpuondemand.service
systemctl daemon-reload