vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   3.8.7 Patch Level 3 Custom Cron Task (https://vborg.vbsupport.ru/showthread.php?t=302648)

Lynne 11-07-2013 10:52 PM

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?

schan 11-07-2013 10:59 PM

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.

Simon Lloyd 11-07-2013 11:09 PM

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.

Lynne 11-07-2013 11:10 PM

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.

Zachery 11-07-2013 11:10 PM

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.

schan 11-07-2013 11:22 PM

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 (Post 2459004)
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.


All times are GMT. The time now is 12:06 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.01476 seconds
  • Memory Usage 1,729KB
  • 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)bbcode_quote_printable
  • (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
  • (6)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