Q:

Restart Tomcat Service on AWS EC2 instance, on a schedule

I have an instance on Tomcat running on EC2.  Based on some resourcing reasons that I don't want to get into, I'd like it to restart each evening at 11:00pm.  I'm not interested in reloading or stopping the applications context as the PermGen space gets crowded until eventually the box tips over and dies.
So where on an aws linux instance do I specify service tomcat7 restart and give it a cron expression?

A:

To add a cronab entry for root user:
sudo crontab -e

which will open an editor. Insert the following line to restart tomcat7 at 11pm daily
0 23 * * * /sbin/service tomcat7 restart

