Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
vB AJAX Cron Details »»
vB AJAX Cron
Mod Version: 1.1.4, by Code Monkey (Contributor) Code Monkey is offline
Developer Last Online: Apr 2014 I like it Show Printable Version Email this Page

vB Version: 3.6.0 Rating: (11 votes - 4.64 average) Installs: 222
Released: 12 Aug 2006 Last Update: 19 Aug 2006 Downloads: 640
Not Supported Template Edits Additional Files  


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

I will support it here as time permits.


Enjoy

Don't forget to click install if you use it.




******************************************
Do not use this with vb 3.5x! There is a difference in the cron table.
The 3.5x version can be found here







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

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.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
True Asynchronous Cron Jobs using Javascript [!AJAX]. No more hanging page loads. Analogpoint vBulletin 3.6 Add-ons 70 13 Jan 2014 02:48
[Not tested] vB-Cron invoked by server cron Brad vBulletin 3.0 Beta Releases 6 25 Jul 2007 03:20
vB AJAX Cron Code Monkey vBulletin 3.5 Add-ons 12 19 Aug 2006 16:12

Comments
  #2  
Old 12 Aug 2006, 02:17
alraqee's Avatar
alraqee alraqee is offline
 
Join Date: Oct 2005
Oops

first replay

i will try it soon
Reply With Quote
  #3  
Old 12 Aug 2006, 04:41
ArabSQuad's Avatar
ArabSQuad ArabSQuad is offline
 
Join Date: Sep 2005
Real name: Abdullrhman
didn't really get what does the hack do ......

but thnx anyway .... :/
Reply With Quote
  #4  
Old 12 Aug 2006, 04:49
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Originally Posted by ArabSQuad
didn't really get what does the hack do ......

but thnx anyway .... :/
Currently, when vb needs to run a sheduled task, it loads image code at the bottom of your forum page. Except it has a php file as the src of the img tag. This causes the php file to run which in turn runs the next scheduled task. This can, depending on the cron to run and the size of the site, cause a browser to seemingly hang until the script is finished running. This happens because this is a syncronous event. Meaning, it's waiting for the page to finish loading the image.

This mod replaces that with an asyncronous AJAX call to the cron script.

The image code has served vb well but with the advent of AJAX type methods there is a cleaner way to do it. That's what this does.
__________________
Gaming Forums

Last edited by Code Monkey : 12 Aug 2006 at 05:32.
Reply With Quote
  #5  
Old 12 Aug 2006, 04:50
Cole2026 Cole2026 is offline
 
Join Date: Feb 2004
Real name: Cole
vBCron is run by a simple link to cron.php in an img tag. This link will activate cron and do updates, then output back to the img tags blank.gif. This mod eliminates that, and instead, uses AJAX processing to activate cron.
Reply With Quote
  #6  
Old 12 Aug 2006, 05:01
x3sphere x3sphere is offline
 
Join Date: Apr 2005
Great work, thanks!
Reply With Quote
  #7  
Old 12 Aug 2006, 05:52
bollie's Avatar
bollie bollie is offline
 
Join Date: Jun 2006
Location: Zele (Belgium)
Real name: ivan
where upload ajax_cron.php ?
Reply With Quote
  #8  
Old 12 Aug 2006, 06:49
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Originally Posted by bollie
where upload ajax_cron.php ?
Notice that it's in a directory called "upload_the_contents_of_this_directory_to_forumhome".

So just upload the contents of that, subdirectories intact, to your forumhome directory.
__________________
Gaming Forums
Reply With Quote
  #9  
Old 12 Aug 2006, 07:01
bollie's Avatar
bollie bollie is offline
 
Join Date: Jun 2006
Location: Zele (Belgium)
Real name: ivan
Thx
Reply With Quote
  #10  
Old 12 Aug 2006, 14:04
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
26 downloads and only 8 installs?

The button must be stuck!
__________________
Gaming Forums
Reply With Quote
  #11  
Old 12 Aug 2006, 15:14
Mohamed Ashraf Mohamed Ashraf is offline
 
Join Date: Jun 2006
Installed but i didnt get what that mean " This works at vbModder.com with vba in a directory above forum home. Make sure you have your home and forumhome path info acp options filled in or it may not work on vba.
"

thank you
Regards,
Mohamed Ashraf
Reply With Quote
  #12  
Old 12 Aug 2006, 15:18
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
I dont understand?

Where is there any image used when using a cron? Crons are made to run automatic, aren't they?
__________________
http://www.nucia.nl/forum/
The best way to kill malware; is to kill it together.
I love vBulletin http://www.vbulletin.org/forum/images/newsm/bunny.gif
Reply With Quote
  #13  
Old 12 Aug 2006, 15:21
redlabour's Avatar
redlabour redlabour is offline
 
Join Date: Mar 2004
Real name: André
Thx - works great !
Reply With Quote
  #14  
Old 12 Aug 2006, 15:26
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Originally Posted by Mohamed Ashraf
Installed but i didnt get what that mean " This works at vbModder.com with vba in a directory above forum home. Make sure you have your home and forumhome path info acp options filled in or it may not work on vba.
"

thank you
Regards,
Mohamed Ashraf
On my site my vbadvanced is in the root directory and vBulletin is in the /forums directory below that.

in vBulettin Options->Site Name / URL / Contact Details there are two settings. Forum Url and Homepage Url. These must both be set or it will not function on your vba home page if you have it in a different directory.

The reason being is that AJAX (and for good security reasons) does not work on remote sites. It can only access files on the site your visiting. So the path has to be set to the file using /dir/dir/file type structure instead of http://site.ext/dir/dir/file. To accomplish this I had to compare the two settings above in order to change the path to cron.php when on a vba page that is in another directory.

I hope that helps
__________________
Gaming Forums

Last edited by Code Monkey : 12 Aug 2006 at 15:32.
Reply With Quote
  #15  
Old 12 Aug 2006, 15:31
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Originally Posted by Eagle Creek
I dont understand?

Where is there any image used when using a cron? Crons are made to run automatic, aren't they?
It's only there if a cron is scheduled to run at time of page load.

In the footer of your page you should see this.


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

When vb needs to run a task it inserts the image code there. When it does not need to run a task it leaves it blank. This mod elimates that mess and runs the task in the background with an XHR (AJAX) call to the file. Much cleaner.

I should add that just as vb does not insert the image code when there is no task to run. Likewise, this script does nothing, and inserts nothing, not even the link to the javascript file, when there is no task to run.
__________________
Gaming Forums

Last edited by Code Monkey : 12 Aug 2006 at 15:34.
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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 15:58.

Layout Options | Width: Wide Color: