What will you be checking with regards to your database?
Your steps will basically be:
1. Code or find a script in php to perform the task you want.
2. Place the script in your user space.
3. Enter cPanel and add a cron to run the script at the interval you wish.