vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How close forum by cron? (https://vborg.vbsupport.ru/showthread.php?t=207069)

lish 03-02-2009 04:43 AM

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!

Marco van Herwaarden 03-02-2009 09:14 AM

You can not do this using the vBulletin Schedulaed tasks. If you want this, then you will need to write an OS cron task.

vbplusme 03-02-2009 09:31 AM

Quote:

Originally Posted by lish (Post 1758195)
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?

lish 03-02-2009 10:39 AM

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.

Marco van Herwaarden 03-02-2009 10:41 AM

You should not run a database check unless it is needed.

lish 03-02-2009 12:29 PM

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

Marco van Herwaarden 03-02-2009 01:18 PM

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.

lish 03-02-2009 02:38 PM

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.

Marco van Herwaarden 03-02-2009 03:08 PM

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.

lish 03-02-2009 05:51 PM

Ok. :)
Are you help me create this scripts?


All times are GMT. The time now is 05:31 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.01013 seconds
  • Memory Usage 1,725KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (10)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