The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Cron Job Script to Delete Redirect Threads
Hi,
I'd like to write a script that will run everynight and delete x old threads that are redirects. I want to make sure that I get this right, since I don't know exactly how the moved w/ redirect feature works, though. Would this script do the job correctly without deleting the real thread? // // Delete all redirects that are older then $numdays // $numdays=3; $datecut=time()-($numdays*86400); mysql_query("DELETE FROM thread WHERE open='10' AND lastpost<=$datecut"); Thanks, Mark |
#2
|
||||
|
||||
yes Mark, your code looks correct. But you may want to test it for a while in your test board if you like.
Btw. I'm sure you know you need to add MYSQL_connect command and choose db beforehand. |
#3
|
||||
|
||||
ok, I'll try testing it on my test forum for a little while before using it on the real forums.
Thanks, Mark |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|