![]() |
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 |
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. |
ok, I'll try testing it on my test forum for a little while before using it on the real forums.
Thanks, Mark |
All times are GMT. The time now is 01:37 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|