Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
[Not tested] vB-Cron invoked by server cron Details »»
[Not tested] vB-Cron invoked by server cron
Version: 1.00, by Brad Brad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-12-2004 Last Update: Never Installs: 4
Re-useable Code Translations Is in Beta Stage  
No support by the author.

This hack strips out normal vB logic that invokes your vBcron tasks by user actions. Normally when a user visits a vBulletin powered page, vB checks to see if any vBcron tasks need to be done.

Altho preformance varys from forum to forum by user activity more often then not tasks are not run when they are supposed to.

This hack attempts to solve this problem by invoking vBcron tasks with the cron service already avaiable on the server. This should not affect the vBcron tasks at all, because we are invoking them with the same php file, just doing it with the server rather then a client.

If you want to take the plunge preform the attached file edits, then run the file /vbroot/cron.php with your servers cron. I will test it more myself soon, until then only use on test boards, defently not for live installs yet.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-13-2004, 12:30 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What a great idea

Good work - I have no test board at present but will subscribe and watch eagerly
Reply With Quote
  #3  
Old 09-13-2004, 04:06 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Indeed... a great idea. Mmm...
Reply With Quote
  #4  
Old 09-15-2004, 09:07 AM
nexialys
Guest
 
Posts: n/a
Default

hum... i see the infos about deactivating the cron from the board side, but would it be possible to have a tutorial for the cron - serverside ?!
Reply With Quote
  #5  
Old 09-15-2004, 12:52 PM
SCN SCN is offline
 
Join Date: Apr 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

try this to run cron.php every 1 min serverside:

Add the line to /etc/crontab

PHP Code:
* * * * root /usr/bin/wget -q http://www.yourdomain.com/forums/cron.php >/dev/null 2>&1 
Thanks for the hack, testing it now. :knockedout:
Reply With Quote
  #6  
Old 11-14-2005, 11:41 PM
Tommy Boy Tommy Boy is offline
 
Join Date: Nov 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any progress on this idea? Is it considered stable for vb 3.5?
Reply With Quote
  #7  
Old 07-25-2007, 02:20 AM
Simon Moon Simon Moon is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Even simpler...
Put this in your crontab (on console do "crontab -e") and replace the url with the actual cron.php location.
Code:
* * * * * /usr/bin/wget -q http://forums.domain.com/cron.php >/dev/null 2>&1
Now only remove this from the footer template:
Code:
	<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
	$cronimage
	<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
Thats it. You could go and do some code edits to remove the functions behind it, but thats not really needed, there is no real impact there. The really great thing though is that you now have real cron jobs, that are run once a minute and it doesn't matter if you have a very active or a hardly visited forum, the load will be the same. Tested on a 3.6.7 vB.
Reply With Quote
Reply

Thread Tools

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


All times are GMT. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04184 seconds
  • Memory Usage 2,249KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete