You could create an Automator app using "Run Shell Script", then replace the example 'cat' command with
find /the/path/to/your/folder -iname "*.log" -type f -mtime +1 -delete
Save as an application
Now setup an iCal repeating event that has an 'alert' that specifies "Opens file", where you specify the file as your Automator created application.
The Unix 'find' command will find all the files that match the specified criteria.
NOTE: Be very CAREFUL with this command as if you point it at the wrong location it will delete things you do not want, and there is no way to return from a delete via 'find'.
The /the/path/to/your/folder is how you tell 'find' where you want it to start searching.
The -iname "*.log" gives it a file pattern to match. I'm assuming your log files end in .log, but the -iname can use any wildcard pattern to match your log files.
The -type f tells the 'find' command to only select actual files, but ignore directories, symbolic links, devices, FIFOs, etc...
The -mtime +1 tells 'find' to select files which have a modification date at least a day old. Anything less than a day old will be ignored.
The -delete will delete any file that matches the previous selection critieria. This is the DANGEROUS part of the command. WIthout this option, 'find' will just display the files it finds. With the -delete it will delete them without any undo capability.
You should test your 'find' command very carefully WITHOUT the -delete to make sure it is selecting the correct files from the correct directory. Once you are happy, you can add the -delete option.
Message was edited by: BobHarris