WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a website working with a user registration/login system all working also.

I wish to automatically send all users an email that have not used their account for 6 months. I have an idea, but just wondered if there would be a better/more convenient solution.

Because this will be done in PHP, I guess this requires a cron job, which isnt a problem as I have done many of them before. Wordpress just doesnt seem to store the last time a user visits my site (to my knowledge). I then thought I could just store in the database (manually) the last time a user visits the site, and run a comparison to the current date in a PHP cron file.

Has anyone got a better suggestion? Or even a plugin to do it for me :p


share|improve this question
up vote 1 down vote accepted

Take a look at the Transients API. It's meant to store data temporary. Note, that this doesn't replace a cron job, as it needs "Action" on the site. So if the site isn't requested, where you set/alter/delete a Transient, then nothing happens.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.