I am experimenting with php unlink()
, what I want to do is run a php script that deletes files created every few minutes after parsing them. I can do that with a cron or as continuously running the file that handles parse/delete on the background. What I want to ask is will deleting files every few minutes, cause problems to my web server or is there any performance downgrade when doing this or some other negative effect I can't think of?
Also how can I create a queue of files to process and dispose with php? Is that any different that what I described above?
Any help is greatly appreciated, I am a bit lost on this.
I think the approach would be based on some variables...
The easiest solution, in my opinion would be to create a cron job. If you can store the image and creation date (db or session), when your cron runs it can evaluate creation time vs script run-time and execute appropriately.
You have a lot of other options, but I think it comes down to the variables listed. Hope this helps.