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

In a plugin I want to build, it deals with contests. A contest has a date on it. Does WordPress have a feature in it where it can run a piece of code every day without requiring someone to create a cron job? Basically I'm wondering if, when you build a blog with WordPress, if WordPress.org or Automattic automatically pings your site once a day or something like that. Because if that's true, I can hook that event and make it run a contest date check.

share|improve this question
up vote 6 down vote accepted

Check out wp_cron and the cron_schedules filter. There are lots of good tutorials out there like this one from WPTuts or this one from Viper007Bond.

share|improve this answer
Okay, so basically WordPress's built-in cron (not the one you can hook up separately through a cron job) is kind of a "hopeful cron", as in it hopes someone visits the site so that the cron runs. And it doesn't appear that sites get pinged back daily unless you set something up (like a Google Alert) to do that. Right? I mean, there's nothing in the WP code that asks Automattic or WordPress.org to ping it once a day, right? – Volomike May 8 '12 at 2:51
You're right about the "hopeful" cron part, but the big advantage is that it's more "server agnostic" than a normal cron job. There are plugins, such as WP-Cron Control, that try to make up for this, though I've never used them. – mrwweb May 8 '12 at 3:01

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.