Nxs
31 Jul 2006, 16:43
Schedule vB's tasks with a host crontab
!!! Warning You run this script at your OWN risk, I will not be responsible for any damage caused !!!
Description:vBulletins schedule tasks only run when a user is browsing your forum. With the release of 3.6 and RSS imports this has caused problems for slow moving forums importing fast moving RSS feeds (If a news item passes fully through the RSS feed before a visitor browses your forums causing the import to be processed then content could be lost)
Solution:If your host supports "Cron Jobs" you can call the attached PHP file periodically to force vBulletin to catch up with its internal scheduled tasks.
Installation
Download the attached file and edit the variables at the top to match your forum installation
Upload the file to somewhere on your host
Schedule this file to run at an appropriate interval
eg. (to run every hour at 15m past the hour, 12:15 - 13:15 - 14:15 - etc.)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Detailed InformationUnfortunatly running the cron.php from the vBulletin files will only process the next pending single task, This short script simply queries the scheduled task database to count how many tasks are pending, it then calls the cron.php routine that number of times - thus your scheduled tasks are kept up to date.
This is my first ever PHP script so please don't expect a masterpiece from a rocket scientist, if anyone has any comments or suggestions please drop me a PM
!!! Warning You run this script at your OWN risk, I will not be responsible for any damage caused !!!
Description:vBulletins schedule tasks only run when a user is browsing your forum. With the release of 3.6 and RSS imports this has caused problems for slow moving forums importing fast moving RSS feeds (If a news item passes fully through the RSS feed before a visitor browses your forums causing the import to be processed then content could be lost)
Solution:If your host supports "Cron Jobs" you can call the attached PHP file periodically to force vBulletin to catch up with its internal scheduled tasks.
Installation
Download the attached file and edit the variables at the top to match your forum installation
Upload the file to somewhere on your host
Schedule this file to run at an appropriate interval
eg. (to run every hour at 15m past the hour, 12:15 - 13:15 - 14:15 - etc.)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Detailed InformationUnfortunatly running the cron.php from the vBulletin files will only process the next pending single task, This short script simply queries the scheduled task database to count how many tasks are pending, it then calls the cron.php routine that number of times - thus your scheduled tasks are kept up to date.
This is my first ever PHP script so please don't expect a masterpiece from a rocket scientist, if anyone has any comments or suggestions please drop me a PM