I needed to automate a task for my Tomcat process. Because I will probably never have time to track down how to actually log errors appropriately using log-rotaters and the like, I wanted to just use plain old crontab. Having never really written a non-trivial shell script before, I found this link invaluable. Enjoy!