Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 11-07-2013, 10:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you considered running this as a true cron job and not a vBulletin Scheduled Task?

And, you said it does 1000 posts... is this every single time... every minute? Why 1000? If it's an arbitrary number, have you considered writing to the database the last postid you did so that you only need to run this for new posts instead of 1000 posts each time?
Reply With Quote
  #12  
Old 11-07-2013, 10:59 PM
schan schan is offline
 
Join Date: Sep 2013
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,

Running it as a true cron job would be ideal since it can just run for hours. I was under the impression that I couldn't do that with vBulletin. I know how to set up true cron jobs, but how would I set it up such that it will run through vBulletin? Any documentation can help. I wasn't able to find anything that related to my problem via search.

Regarding your question, it actually does grab 1000 new posts each time. We have a flag called "fixed" and that flag is set to 1 for posts that have been corrected. We skip those. The reason why we're doing this is because we want to correct all posts in the database. A lot of posts were posted way back since ~2005 or possibly earlier (I just came on board a few months ago). Our current engine corrects new posts, but we want to correct all the previous posts (~3.2 million) of them. Choosing 1000 would make sense since we want to be done with it at a reasonable time.

I'm looking forward to your help with setting this up as true cron job that will work via vBulletin.

Thank you in advance.
Reply With Quote
  #13  
Old 11-07-2013, 11:09 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You wouldn't need to run it "through" vbulletin, your cron is working on the database which is a stand alone that vbulletin queries, so unless your spell engine is only integrated in to vbulletin and cant be used as a stand alone you should be fine to set up a true cron.
Reply With Quote
  #14  
Old 11-07-2013, 11:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may want to see how this person did it - https://vborg.vbsupport.ru/showthread.php?t=164477 There really isn't a reason you can't run it as a real cron job. My guess would be you just need to add some lines of code to connect to the database and then the rest of your code should work fine.
Reply With Quote
  #15  
Old 11-07-2013, 11:10 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd suggest doing smaller posts in batches, if your post table is myisam, you might want to change it to innodb, while this task is running anyway.
Reply With Quote
  #16  
Old 11-07-2013, 11:22 PM
schan schan is offline
 
Join Date: Sep 2013
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you everyone for your responses. I'll consider these options and will report back on the results.

--------------- Added [DATE]1383870166[/DATE] at [TIME]1383870166[/TIME] ---------------

Simon,

The spell correct engine is a plugin for vBulletin hence why I need it to run via vBulletin.

--------------- Added [DATE]1383871817[/DATE] at [TIME]1383871817[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
You may want to see how this person did it - https://vborg.vbsupport.ru/showthread.php?t=164477 There really isn't a reason you can't run it as a real cron job. My guess would be you just need to add some lines of code to connect to the database and then the rest of your code should work fine.
This plugin actually works great, but the only downfall is that it will not work on Windows platform. My boss wants it to work on all systems so unfortunately this solution will not work for my case...although it's a clever plugin. Thanks, Lynne.

--------------- Added [DATE]1383872819[/DATE] at [TIME]1383872819[/TIME] ---------------

From more troubleshooting, it appears the issue is related to an existing plugin. I'll have to figure out which one.

Thank you everyone for your help.
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:51 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.05132 seconds
  • Memory Usage 2,205KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete