Forum

Thread tagged as: Question, Blog, Comments

Blog spam comments and scheduled tasks in general

Guys, moved this to the forum after a few initial tweets. It has lead me to ask a few more questions about this.

So with blog comments (spam comments) these are deleted after a set period. What is the set period by default? Am I right in understanding that this needs can also be changed within the scheduled_tasks.php file inside the blog?

Moving on from this would this automatically happen or do we need to setup scheduled tasks? https://docs.grabaperch.com/docs/scheduled-tasks/ If we do then it is a case of creating a key in the config and then creating a cron job or running it manually through an address, thats my understanding from the doc above.

Spam comment removal or other scheduled tasks won't happen without creating this schedule task key and setting up a cron? Is this correct?

Would this be the same for other tasks like the removal of assets after period of history/revision control is passed?

I am a little unclear on what is exactly required so if you could kindly clarify.

Thanks Terry

Terry Upton

Terry Upton 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There's an option on the Settings page for how frequently spam is deleted.

You'd need to set up scheduled tasks with a cron job.

https://docs.grabaperch.com/docs/scheduled-tasks/

Thanks Drew. So for the blog comments I would run a cron to this script? /perch/addons/apps/perch_blog/scheduled_tasks.php?secret=mysecret

And for things like asset removal would I run a cron to this script? /perch/core/scheduled/run.php?secret=mysecret

Naturally based on locations of where things are etc

Is asset removal relevant now with the new assets functionality? Have/will you be dropping this as a scheduled task in the future?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, asset removal is done when a new revision is created. So at edit time, not on a schedule.