Quote:
Originally Posted by natkejs
It's not about the overhead of running unlink, it's about the directory listing which is exponentially faster using find.
Since the PHP script does nothing that a simple find command can't do, the cron should simply run the find command not a PHP script.
Something like:
find /path/1/ /path/2/ /path/3 -type f -mtime +30 -exec rm -f {} \;
|
You're assuming this person is comfortable and familiar with the command line and the find command.
My assumptions are they know how to write PHP but that's about it.
And if you're optimizing your cronjobs there's a root issue not being solved.