I want to create a script, to delete some records after X time, I will choose it, but I don't know, How can I do that? And the same thing with my files, I want to delete some files after X time from upload for example, and to do that, I will delete the file from my storage, and the file record from the database, but that will make my site slow, Any way to do that without problems
Use this for example?
Soft Deleting or Task Scheduling
My Table is:
so I want to delete this record for example after 2 hours from creation? but I have a lot of records? how to do that?
Files Table :
these are my records, they contain the path of my files, but every file will expire after 5 days from creation for example, so I will delete it from the path and delete there record from the database after that. but that will make the site very slow? any way to do that?
Thanks :)