sorry to say, but this whole premise seems just ... wrong.
why reinvent the wheel and not use cron or systemd? why reboot instead of searching for the offending script/process and fixing it?
why reinvent the wheel and not use cron or systemd? why reboot instead of searching for the offending script/process and fixing it?