vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to run vB's cron jobs on forums with low users ? (https://vborg.vbsupport.ru/showthread.php?t=122414)

Nxs 07-28-2006 05:58 PM

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.

Nxs 07-30-2006 01:36 PM

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.

Marco van Herwaarden 07-30-2006 03:50 PM

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.

Paul M 07-30-2006 03:56 PM

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.

Nxs 07-30-2006 05:06 PM

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.


All times are GMT. The time now is 02:25 AM.

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.00954 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete