To run a script or command at every restart, add this to crontab by running crontab -e
@reboot /path/to/my/program