Forum Moderators: phranque
I am setting up a wordpress blog on my site.
Got everything working ok.
One feature is you can post to your blog
by sending an e-mail to a secret address
that is only known by yours truely.
I had to setup a cron job to go out an look
for pending e-mails to be posted to the blog.
That works great.
The only problem is that each time the cron job
runs it leaves a small file out on the root of
my server.
So I just noticed this 2 days ago,and had to delete
over 10 thousand of these wp-mail.php 10xx files.
The question is what do I do to prevent this.
Create another cron job that deletes these files?
Thanks for any suggestions.
;rm /folder/path/wp-mail.php
or whatever the filename you want to remove is called, should just take a single line of code. The ; makes it so it's a new statement, you can just tack that on the cron script, that's pretty much all you need to do assuming it's a bash/sh script.
If it's not, you'd have to use the php equivalent for deleting the file.