The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vBulletin run maintenance task regularly
Please what is the way to run some maintenance task (from maintenance section) regularly, like every 24 hours? Like rebuilding similar threads or optimising mysql tables..?
The URL to run is: yourdomain.com/admincp/misc.php?do=updatesimilar when its executed and admin loged in, it start the process. But how to login from within cpanel cronjob? If not possible, what is the easiest way to run some maintenance task regularly automatically? If not possible easily, can please anyone write universal mod or script to run any choosen maintenance task from maintenance section. Sure it will be handy to many. Thank you |
#2
|
|||
|
|||
In general, you could take the code for a given task from admincp/misc.php and make it a plugin using hook cron_script_cleanup_daily (to run once per day). But it would take some work because of course those maintenance tasks are written for an admin to do from the admincp, so some of them only do a certain number of records per run (and then show some kind of "continue" page). So the mod you suggest would take some work.
I should also mention that I don't think there's anything in the maintenance menu that should have to be run regularly, which is probably why it's there and not in a scheduled task already. |
#3
|
|||
|
|||
Quote:
So i step forward duplicating and renaming misc.php file and made a modiffication there: Code:
if (!can_administer('canadminmaintain')) { echo "Have rights..)"; // print_cp_no_permission(); then i tried to add cronjob this way: wget -O http://myforum.com/admincp/misc.php?do=updatesimilar /dev/null wget http://myforum.com/admincp/misc.php?do=updatesimilar curl http://myforum.com/admincp/misc.php?do=updatesimilar But none of these makes a new entry into Control panel log (http://myforum.com/admincpilf/adminlog.php?do=choose) It seems liek that the output is vbulletin admin login page.. how to skip this? Please anyone know if the job was run properl and its correct that there is no entry in log? How to tweak it further to work? (PS i know making above notiffication makes a vulnerability, so this is only temporary change and i will then rename file to something other..? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|