Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2006, 05:58 PM
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to run vB's cron jobs on forums with low users ?

I expect the forums I run to sometimes go a full day with any visitors

vBulletins schedule tasks are run when the forums are accessed (i guess it checks the time and runs any that should have been run at that point)

One of these scheduled tasks is to pull information from the RSS feeds you subscribe to (vB 3.6) but one of the feeds I subscribe to only retains 10 news items, it is possible that on a day the forum has no users - posts that should be picked up by the RSS scheduled task are missed as they have flowed through the chain and are now lost.

So, i'm looking for a way to get a linux cron job to wake up vBulletin's scheduled tasks every hour.

After talking with my host and logging a vB support ticked - im still at square 1 and could use some help.

From a SSH (testing)
/pathtophp/php -f /pathtoforums/forums/cron.php
returns a few characters of garbage, but the RSS import is not run

wget http://www.mysite.com/forums/cron.php
downloads the same few characters of garbage to a file, again the RSS import is not run

the nice vB staff then sugested calling the rssimporter php file directly - but this does import anything when run

Any ideas / clues from the pro's here ? I'm surer there are other forums out there that will soon suffer the same problems when they try to import a fast moving RSS source into a slow moving forum.
Reply With Quote
  #2  
Old 07-30-2006, 01:36 PM
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did some more testing with this today, and found out that my attempts above did infact work (to some extent) so using either of the following works
it looks like calling "cron.php" will only process the next scheduled task.So if you have 3 tasks waiting (and the 3rd is your RSS import) you will need to run access the "cron.php" file three times.
Reply With Quote
  #3  
Old 07-30-2006, 03:50 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about wget of your forum index.php page?

That is the page that should trigger (or better the footer, so a different member page should also work) the scheduled tasks.
Reply With Quote
  #4  
Old 07-30-2006, 03:56 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nxs
it looks like calling "cron.php" will only process the next scheduled task.So if you have 3 tasks waiting (and the 3rd is your RSS import) you will need to run access the "cron.php" file three times.
That's correct, only the next task is processed by a call.
Reply With Quote
  #5  
Old 07-30-2006, 05:06 PM
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
That's correct, only the next task is processed by a call.
Well problem solved now, knocked up a short PHP script to run through the scheduled task database and call cron.php for those which should have run. Just need to pop this as a cronjob on my host and the problem has gone away.
Reply With Quote
Reply


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:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04038 seconds
  • Memory Usage 2,198KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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