Can I create a cron job to delete tmp folder?

After chatting with Dreamhost it appears that my temp folder was filled up which prevented any php sessions from starting. They were able to clear it out and things were fine. They mentioned if I had an admin account I could run the following command to clear it out myself.

sudo rm /tmp/*

I was just wondering if I put that line of code in the cron job section of the control panel where you can create cron jobs if it would clear it out automatically each day or whatever the time frame I set it to run for.

Any help is appreciated.