Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Schedule vB's tasks with a host crontab Details »
Schedule vB's tasks with a host crontab
Mod Version: 1.00, by Nxs (Member) Nxs is offline
Developer Last Online: Feb 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 RC3 Rating: (4 votes - 4.25 average) Installs: 22
Released: 31 Jul 2006 Last Update: Never Downloads: 281
Not Supported Additional Files  

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
  1. Download the attached file and edit the variables at the top to match your forum installation
  2. Upload the file to somewhere on your host
  3. 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.)
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Detailed Information
Unfortunatly 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

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Administrative and Maintenance Tools Execute Scheduled Tasks Via Crontab Jafo232 vBulletin 3.6 Add-ons 26 15 Jan 2013 13:39
Disable Scheduled Task (crontab) in AdminCP without deleting mtha vBulletin 3.0 Full Releases 10 08 Oct 2005 14:16

Comments
  #2  
Old 31 Jul 2006, 16:44
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
I wasn't at all sure which forum to drop this script into, but as it relates mostly to the new RSS feature in 3.6 I guessed here was as good a place, sorry if it isn't.
Reply With Quote
  #3  
Old 31 Jul 2006, 17:19
Evercraft's Avatar
Evercraft Evercraft is offline
 
Join Date: Jan 2005
Very nice!
__________________
My Hacks
vB Event Forums
Reply With Quote
  #4  
Old 01 Aug 2006, 08:18
Milad's Avatar
Milad Milad is offline
 
Join Date: May 2005
Real name: Milad
very good work

Now vBulletin has real cronjop
Reply With Quote
  #5  
Old 01 Aug 2006, 08:44
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
Originally Posted by Milad
very good work

Now vBulletin has real cronjop
Well, only if you schedule this script to run every minute - and i'm sure your host will have something to say about that

Mine just runs every hour and typicaly has about 5 or 6 jobs to run at that point if no one has visited the forums in that time, works really well for importing RSS feeds tho.
Reply With Quote
  #6  
Old 29 Mar 2007, 17:50
jmw jmw is offline
 
Join Date: Jan 2005
Does this work with 3.6.5? It appears the "15 minute after the hour" example has the file name backwards.
__________________
Bertha you know what?? ENOUGH!!!! GIT BACK IN THE DAMN TRAILER AND GIT US BOYS MORE BEER WOMAN!

Last edited by jmw; 30 Mar 2007 at 21:25.
Reply With Quote
  #7  
Old 04 May 2007, 17:53
dooch dooch is offline
 
Join Date: Dec 2005
yes it does work with 3.6.5 I had to change it slightly for non-localhost connections Here is the part you need to change.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Nice work dude!

INSTALLED

Thanks

Dooch
Reply With Quote
  #8  
Old 06 May 2007, 08:27
NiTRoN NiTRoN is offline
 
Join Date: Dec 2005
Real name: Big Kauhuna
Sweet this is excellent for small boards.. I've been waiting sooooooo loooooong for this..
Reply With Quote
  #9  
Old 27 Jun 2007, 16:04
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
This is working nicely. I can't believe that VB doesn't offer something like this to run the scheduled tasks, because without traffic, those tasks will not run. That's just stupid.

Thanks!
__________________
http://www.trilliummud.com - Wordpress, Drupal and VBulletin. A perfect marriage of open and closed source. Visit us to see them in action together!
Reply With Quote
  #10  
Old 24 Jul 2007, 20:40
gamma912 gamma912 is offline
 
Join Date: Feb 2007
yea thats true - Thanks Im using it now it works great
Reply With Quote
  #11  
Old 09 Aug 2007, 22:21
jmw jmw is offline
 
Join Date: Jan 2005
Doesn't work with vbulletin 3.6.8
__________________
Bertha you know what?? ENOUGH!!!! GIT BACK IN THE DAMN TRAILER AND GIT US BOYS MORE BEER WOMAN!
Reply With Quote
  #12  
Old 07 Jul 2008, 15:41
OmniBuzz OmniBuzz is offline
 
Join Date: Nov 2006
any chance to have an update for the latest release of Vbulletin ?
Reply With Quote
  #13  
Old 03 Aug 2008, 22:29
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
Yeah, I can't seem to get it to work anymore. Sad, but I'm uninstalling. I'll have to write a shell script or something to trigger the cron in VB every 15 minutes or something.
__________________
http://www.trilliummud.com - Wordpress, Drupal and VBulletin. A perfect marriage of open and closed source. Visit us to see them in action together!
Reply With Quote
  #14  
Old 12 Aug 2008, 20:42
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
I need something like this for my Devopment board where I need to test but there are no users to make the scripts work. I will see if I can get it working on my 3.6.x site.
Reply With Quote
  #15  
Old 19 Jun 2009, 21:09
plothook plothook is offline
 
Join Date: Apr 2007
This works for me using vB 3.8.3

save the code below into a script file named vbcronjob.sh, and call the script from cron (I schedule my crontab for once a minute). Be sure to chmod +x the script. The logic in this shell script is pretty much the same as in the cron-exec.php script you can download here.

you should also disable the cron image inserted at the bottom of the pages presented to your users. See This Mod for a simple plugin to do that.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 05:43.

Layout Options | Width: Wide Color: