The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Scheduled Task (User Promotions) Not working correctly
Hello! I have a problem with my User Promotions task. I have set it to run every minute since my community is not that big atm for it to cause lag/loadtime but it doesent run. I have to manually press it for it to actually perform.
It is active and everything else seems fine but it does not run when its supposed to. Any advice? Thanks! |
#2
|
|||
|
|||
Scheduled tasks will only run when your site has traffic, so if you set it to run once per minute, it will only run that often if you have continuous traffic on your site.
Also, I believe the promotion scheduled task only promotes users who have been active recently (the past 24 hours, I think). But if you run it by pressing the "Run Now" button, then I think it will pronote all users who meet the requirements. |
#3
|
||||
|
||||
Oh, lol. Whats the best time to set it to for a starting community for it to run frequently?
|
#4
|
|||
|
|||
I don't know really - you could leave it at once per minute and most of the time it won't have anything to do. I guess if your site eventually gets very busy you might want to have it run less often.
|
#5
|
|||
|
|||
Sorry for bumping this thread again, but how can i change the promotion.php NOT to check if the user has been active recently? i want the same behavior like if i press the "Run Now" button, only sheduled.
|
#6
|
|||
|
|||
If you look at includes/cron/promotion.php around line 40, you see this:
Code:
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON (usertextfield.userid = user.userid) " . iif(VB_AREA != 'AdminCP', "WHERE user.lastactivity >= $lastrun") ); if you change it to this (delete everything after the first " on line 41): [CODE] Code:
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON (usertextfield.userid = user.userid) " ); Then you should always get everyone (but it might add a lot of processing, especially if you have many members and/or are running it once per minute). BTW, what I said in an earlier post wasn't correct - it processes all users active since the last time the cron job ran, not the last 24 hours). Why did you want to do this again? It seems like if promotions are based on number of posts then there's no way that's going to change unless the user was active. It might be a good mod if someone could come up with one that recalculated possible promotions as soon as a user posts. It might be as easy as taking the guts of this function and putting it in a plugin somewhere. |
#7
|
|||
|
|||
Quote:
thanks btw, i'll give it a try! |
#8
|
|||
|
|||
That would be something I'd be interested in....I don't have the skill to do it myself LOL
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|