I have been using this mod for quite some time (clicked install over a year ago) now, and always lived with vBulletin cron tasks running one at a time when the linux cron ran once a minute.
But last week I got ambitious and dug into the bash shell to write this script that runs all the tasks scheduled for any any particular minute, instead of allowing them to sit in 'backlog' until the next minute.
Code:
#!/bin/bash
#----- environment setup -----#
# Absolute path to vBulletin root (where cron.php is located)
ct_pathtoforum='/home/user/public_html/forum/'
# Max tasks to run on one pass
ct_max=10
#----- database setup -----#
ct_dbhost='localhost' # your MySQL Server
ct_dbport='3306' # your MySQL Port
ct_dbname='forum' # your vBulletin database
ct_dbuser='username' # user with READ access
ct_dbpass='password' # password for the above user
ct_dbprefix='' # database prefix, if required
#----- query execution ----#
ct_date=`date "+%s"` # current unix time
ct_connect="--protocol=socket -h$ct_dbhost -P$ct_dbport -u$ct_dbuser -p$ct_dbpass -D$ct_dbname"
ct_query="SELECT COUNT(*) FROM ${ct_dbprefix}cron WHERE active=1 AND nextrun < $ct_date;"
# -A, No automatic rehashing, gives quicker start.
# -B, Batch mode.
# -N, Don't write column names.
# -n, Flush buffer.
# -q, Don't cache.
# -r, Write raw fields.
# -e, Execute command and quit.
ct_repeat=`mysql $ct_connect -A -B -N -n -q -r -e"$ct_query"`
#----- cron execution ----#
ct_pathtophp=`which php` # path to PHP
cd $ct_pathtoforum
if [ "$ct_repeat" -gt "$ct_max" ]; then ct_repeat=$ct_max; fi
for ((i=0; ct_repeat>i; i++)); do
#echo "$i"
$ct_pathtophp ./cron.php >& /dev/null
sleep 5
done
exit 0