This terminal command restarts my heroku application:
heroku restart
Is there a way to run a script that will run this command and restart
You could create a heroku cron job that uses the Heroku api on your application to restart itself...
One question though - why?