Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 25 Mar 2012, 21:32
tafreeh's Avatar
tafreeh tafreeh is offline
 
Join Date: May 2008
Location: Canada
Real name: DON
Cron Job to Prune Thread

Hello,
How can I setup a Cron Job to permanently delete soft deleted thread && thread has been soft deleted for more than 7 days.

OR

Permanent Delete all threads from a forum that are only 7 days old. In this case Delete only X amount of threads per day.

Please guide.
Thanks
__________________
Vb Forum
Reply With Quote
  #2  
Old 26 Mar 2012, 22:41
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
If you write a script to do what you described, you can put it in includes/cron and then create a new scheduled task to use it. You can look at the other scripts in that folder to see how they work.

I'm not sure if that's a lot of help - as for the thread pruning, you can find that code in an existing script and copy it. I think admincp/thread.php has code for when you do it from the admincp.
Reply With Quote
  #3  
Old 27 Mar 2012, 01:45
tafreeh's Avatar
tafreeh tafreeh is offline
 
Join Date: May 2008
Location: Canada
Real name: DON
okay, I will look into it. But if someone else be more helpful that would be great !!

Thanks a lot kh99
__________________
Vb Forum
Reply With Quote
  #4  
Old 27 Mar 2012, 06:26
Pandemikk Pandemikk is offline
 
Join Date: Jul 2009
Real name: Jon
There's no easy way to tell, natively, when a thread has been soft deleted. However, a work-around to this would be to delete threads where the last post is older than 7 days ago and the thread is soft deleted. The reasoning behind this is that once a thread has been soft deleted it won't be posted in anymore.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will delete all soft deleted threads that haven't had a post in the past 7 days. Untested- should work fine.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Administrative and Maintenance Tools Periodic Prune Pms [ Cron Job - Fully Controlable ] Omranic vBulletin 3.8 Add-ons 57 13 Sep 2013 00:48
Cron job: Prune forums jamoss vBulletin 2.x Full Releases 15 04 Jul 2003 07:51



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:46.

Layout Options | Width: Wide Color: