PDA

View Full Version : [Not tested] vB-Cron invoked by server cron


Brad
13 Aug 2004, 01:47
This hack strips out normal vB logic that invokes your vBcron tasks by user actions. Normally when a user visits a vBulletin powered page, vB checks to see if any vBcron tasks need to be done.

Altho preformance varys from forum to forum by user activity more often then not tasks are not run when they are supposed to.

This hack attempts to solve this problem by invoking vBcron tasks with the cron service already avaiable on the server. This should not affect the vBcron tasks at all, because we are invoking them with the same php file, just doing it with the server rather then a client.

If you want to take the plunge preform the attached file edits, then run the file /vbroot/cron.php with your servers cron. I will test it more myself soon, until then only use on test boards, defently not for live installs yet.

Natch
13 Aug 2004, 02:30
What a great idea :)

Good work - I have no test board at present but will subscribe and watch eagerly :D

Erwin
13 Sep 2004, 18:06
Indeed... a great idea. Mmm...

nexialys
15 Sep 2004, 11:07
hum... i see the infos about deactivating the cron from the board side, but would it be possible to have a tutorial for the cron - serverside ?!

SCN
15 Sep 2004, 14:52
Hi,

try this to run cron.php every 1 min serverside:

Add the line to /etc/crontab



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Thanks for the hack, testing it now. :knockedout:

Tommy Boy
15 Nov 2005, 01:41
Any progress on this idea? Is it considered stable for vb 3.5?

Simon Moon
25 Jul 2007, 04:20
Even simpler...
Put this in your crontab (on console do "crontab -e") and replace the url with the actual cron.php location.


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Now only remove this from the footer template:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Thats it. You could go and do some code edits to remove the functions behind it, but thats not really needed, there is no real impact there. The really great thing though is that you now have real cron jobs, that are run once a minute and it doesn't matter if you have a very active or a hardly visited forum, the load will be the same. Tested on a 3.6.7 vB.