How do I create a scheduled task that deletes files of a certain name everyday?
Add the following to your crontab (run env EDITOR=nano crontab -e to edit your crontab):

@daily /usr/bin/osascript -e 'tell application "Finder" to delete (every file of folder "Macintosh HD:Users:username:Downloads" whose name starts with "message" and modification date is less than (get current date) - 2 * days)'


Untested as I have no such files on my system. Keep backups and make sure you've got the right path.