Step 1. (Optional) Edit the attached file and change 50 to whatever you want (you can leave it at 50 if that number is ok with you)
The 50 is at the end of this line...
PHP Code:
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "shoutbox_posts WHERE shoutid < ($lastshoutid[max] - 50)");
That number (50 in this case), controls how many shouts are left in your database after this script runs
Step 2. (Optional) Save the file. (if u did step 1)
Step 3. Upload deleteoldshouts.php to your includes/cron/ directory
Add a new scheduled task as shown in the attached images.
Change it to whatever suits you.
If you use it, thank sabret00the and MarcoH64 for enlightening me on the correct query string.