PDA

View Full Version : How close forum by cron?


lish
03-02-2009, 04:43 AM
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
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?