Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 03-02-2009, 04:43 AM
lish's Avatar
lish lish is offline
 
Join Date: Mar 2006
Location: Russia
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How close forum by cron?

Hello!
Please help me.

I need close and open forum by cron. How it's make?
May be is simple script?
Help please please. Write code please.

Thank you!
Reply With Quote
  #2  
Old 03-02-2009, 09:14 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can not do this using the vBulletin Schedulaed tasks. If you want this, then you will need to write an OS cron task.
Reply With Quote
  #3  
Old 03-02-2009, 09:31 AM
vbplusme vbplusme is offline
 
Join Date: Sep 2008
Location: CyberSpace
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lish View Post
Hello!
Please help me.

I need close and open forum by cron. How it's make?
May be is simple script?
Help please please. Write code please.


Thank you!
Can you explain a little more about what you are trying to do? What are you trying to close and restart?
Reply With Quote
  #4  
Old 03-02-2009, 10:39 AM
lish's Avatar
lish lish is offline
 
Join Date: Mar 2006
Location: Russia
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can close vbulletin from admin panel (options -- > vbulletin close/open)
--
I want close vbulletin for check base every night from cron linux. (cron.d)

For example:
00 04 * * * root /usr/local/scripts/closevb # close vb
05 04 * * * root /usr/local/scripts/mysqlcheck -r ... #check base
15 04 * * * root /usr/local/scripts/openvb #open vb

I need create scripts: closevb and openvb.
I do not have experience for creation of these scripts.
Please help.
Thank you.
Reply With Quote
  #5  
Old 03-02-2009, 10:41 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should not run a database check unless it is needed.
Reply With Quote
  #6  
Old 03-02-2009, 12:29 PM
lish's Avatar
lish lish is offline
 
Join Date: Mar 2006
Location: Russia
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why?
auto check database it's very useful.
I have big database and very loaded forum.
And each time check corrects something after day of operation
Reply With Quote
  #7  
Old 03-02-2009, 01:18 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If each day you have corrupted tables in need for a repair, then you should find the cause of this, not hiding it by resolving the symptoms.
Reply With Quote
  #8  
Old 03-02-2009, 02:38 PM
lish's Avatar
lish lish is offline
 
Join Date: Mar 2006
Location: Russia
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I understand you. Thank you. (Sorry I was mistaken, not repair, it's optimize(mysqlcheck -o) every night)
But now i need scripts to close and open vb for OS cron
If you can help me, I will be happy.
Thank you.
Reply With Quote
  #9  
Old 03-02-2009, 03:08 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also an optimise is not needed. If you would run that once a month (if at all) it would be more then enough, unless you have just delete very large amounts of data.

Optimising should only be done when needed, as it is not a riskfree operation and could cause database problems.
Reply With Quote
  #10  
Old 03-02-2009, 05:51 PM
lish's Avatar
lish lish is offline
 
Join Date: Mar 2006
Location: Russia
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok.
Are you help me create this scripts?
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 01:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09029 seconds
  • Memory Usage 2,243KB
  • 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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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