vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Need Cron Suggestion (https://vborg.vbsupport.ru/showthread.php?t=79729)

Marco van Herwaarden 04-21-2005 05:38 AM

Just add a column to the items 'last_queried' and put a timestamp in it when it gets queried. Then do a "SELECT * FROM items ORDER BY lastqueried DESC LIMIT 10" or something like that.

AN-net 04-21-2005 01:32 PM

well i am going to do that but thats only 10 i need to multiple tens since i have more than 10 items

Marco van Herwaarden 04-21-2005 02:06 PM

Well the next page load it will do the next 10.

AN-net 04-21-2005 05:11 PM

so how would i make the script reload with cron?

Colin F 04-21-2005 05:18 PM

you don't want to reload the script with cron.
Just have the cron job run every minute or so.

noppid 04-21-2005 06:32 PM

Sounds like the Amazon API. :)

You will not be sucessful with a vB cron job if so. Even if it's not amazon, those one second delays are common in xml feeds generally, so you should look at using the API for the feed and update items when requested with live data. Cache only item numbers, get the rest live.

I did this with FREEBS - Free Book Store for amazon. Keyword specific books are on file, however any book listed on amazon can be displayed on YOUR site if requested. Even if you purge your DB and have no books on file, if a user requests a URL from the search engines, you will still be able to display the book.

AN-net 04-21-2005 07:58 PM

well i want it to only run between a certain time of the day

im trying to avoid grabbing live data on the spot because load times are unexceptable


All times are GMT. The time now is 07:27 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.01004 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete