PDA

View Full Version : vB AJAX Cron


Code Monkey
08-11-2006, 10:00 PM
vB AJAX Cron From vBModder.com

This is such a small but useful mod that I decided to give it away free. This mod will replace your sheduled task image code at the bottom of your pages and run your sheduled tasks via an AJAX call.

AJAX is asyncronous and offers true background running of sheduled tasks. This does not change anything with the actual tasks or the scripts that run them. It merely replaces the method that initiates the running of those scripts.

There are no template edits of any kind. Simply upload the files to your forumhome directory and import the product xml file.

This should work in any vb or custom script in any directory.

Full support will only be given at vbmodder.com (http://vbmodder.com/)

I will support it here as time permits.
[/URL]


Enjoy

******************************************
Do not use this with vb 3.6x! There is a difference in the cron table.
The 3.6x version can be found [URL="https://vborg.vbsupport.ru/showthread.php?t=123719"]here (http://vbmodder.com)

Paul M
08-12-2006, 12:07 AM
I saw this mentioned somewhere earlier today, sounds good.

Just curious why you've set the vb version to 3.5.0 ?

Code Monkey
08-12-2006, 12:18 AM
Isn't it supposed to be a minimum version supported?

I uploaded one for 3.6 as well since there is a slight change to the cron tables in 3.6.

FreshFroot
08-12-2006, 05:46 AM
well I think he mean't why is it 3.5.0 instead of 3.5.5? Because most hacks that are out.. are usally named after the recent release.... so 3.6.0 or 3.5.5.....?

Anyways good hack mate, nice stuff :D

Code Monkey
08-12-2006, 05:52 AM
well I think he mean't why is it 3.5.0 instead of 3.5.5? Because most hacks that are out.. are usally named after the recent release.... so 3.6.0 or 3.5.5.....?

Anyways good hack mate, nice stuff :D

I've been posting hacks here long enough to know that when you do that you get questions like, "dude, does it work with 3.50, cuz it says 3.54?" Which is why they have been told numerous times they need a 3.5x option. ;)

Code Monkey
08-12-2006, 03:37 PM
Seems to be a lot more hits on the 3.6 version. I take it a lot of people are upgrading then. More so than 3.x to 3.5x in the beggining.

Code Monkey
08-13-2006, 06:19 AM
Updated. This should now work on any pages. The fix actually eliminated many lines of php code.

cynix2
08-15-2006, 03:55 PM
i just installed this and i must say i notice a significant speed increase on my boards which are rather large

Code Monkey
08-16-2006, 02:48 AM
That's good to here. I figured the bigger the board the more you will notice the difference when you are the lucky dog that runs the cron.

Code Monkey
08-16-2006, 03:42 PM
If anyone is using a plugin that needs the cron_start hook (I have never seen one) please let me know. This mod will break it if it does since it's not using cron.php where the hook exists. If this is a problem for anyone I will have to come up with a work around. I doubt it but you never know.

Code Monkey
08-17-2006, 11:41 PM
New version 1.1.2

Added ajax_cron_start hook. Now if you should ever have a plugin that uses the cron_start hook simply change it to use the ajax_cron_start hook.

Code Monkey
08-19-2006, 01:26 AM
New Version 1.1.3

Now it will just use cron_start hook if you have a plugin that uses it. Aparently vb doesn't actually care where the hook is located.

Live and learn.

Code Monkey

Code Monkey
08-19-2006, 03:12 PM
New Version 1.1.4

This will now degrade gracefully when browsers have javascript turned off. When a browser has javascript turned off the default vb method will be implemented to ensure the cron runs.

Code Monkey