Forum Moderators: phranque

Message Too Old, No Replies

wordpress blog / e-mail post cron job question

wordpress e-mail post cron job question

         

atpservices

4:45 am on Dec 21, 2005 (gmt 0)

10+ Year Member



Hi, New to this forum. Great Info here.

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.

2by4

1:47 am on Dec 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



no need to create another cron job, just have the last step of the script run by cron deleting that little file, whatever it's called.

;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.