Cron Script to Delete Folder Contents Every 5 Minutes on Media Temple
Posted
by
Brian Iannone
on Server Fault
See other posts from Server Fault
or by Brian Iannone
Published on 2012-09-27T08:00:09Z
Indexed on
2012/09/27
9:39 UTC
Read the original article
Hit count: 263
I'm not familiar with server-side scripting, but I'm currently using a PHP application on Media Temple to cache JPEGs from four webcams hosted on a server located in the middle of the Indian Ocean. (Hence my reason for caching them in the US.)
The webcams are updated every five minutes. The PHP application stores the cached images in http://static.rigic.co/cache/. I would like to create a cron script to automatically delete the contents of "cache" (not the folder itself; just the files inside) at a regular interval.
© Server Fault or respective owner