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 custom post type Events. In that post type, I can schedule events with a date and time. Whenever I publish an event, it will automatically send an email to the users 2 days before the event.

However, I noticed that in order for the script to work, I need to have the wesite running. Is my assumption correct? I can't seem to find anything in the Codex regarding this.

How do I fix this?

I am using a plugin called wp-delayed-mail

share|improve this question
up vote 0 down vote accepted

This plugin uses WordPress CRON API. Its no the same thing as usual CRON jobs available at cPanel dashboard. The difference is in the way how they are executed.

When somebody visits your site, WordPress checks if there is a scheduled job which has to be run, then WordPress runs this job by initiating a separate request to a specific URL. If nobody visits your site, then your CRON jobs won't be run even if they are already overdue...

In other words to run WordPress CRON jobs in time you have to have visitors on your site. Another option would be to ping your site by using special service...

share|improve this answer
What part in the plugin code tells me that it uses a certain cron job? Also, "Another option would be to ping your site by using special service..." is this the only option I have? Or are there other ways? – user1526570 Oct 2 '13 at 8:20
Take a look at this line. As you can see it calls wp_schedule_single_event(...) function, which means that WP CRON job is used. – Eugene Manuilov Oct 2 '13 at 8:23
is this the only option I have? Or are there other ways? Maybe... Don't know another way to run WP jobs... – Eugene Manuilov Oct 2 '13 at 8:25
Thanks. How do I make it so that I don't need to have my website active for the script to work? – user1526570 Oct 2 '13 at 8:25
It's very wide question, which I can't answer... – Eugene Manuilov Oct 2 '13 at 8:27

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.