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 am testing the wp_schedule_single_event function and it is currently not working on my upgraded version of wordpress.

It looks like the event is being scheduled but the code in my hook is never executed. Any help with this matter would be greatly appreciated

Here is example code I put in my themes function.php:

    update_option('test_action_option', 'Scheduled: ' . $_GET['begintest']);
    wp_clear_scheduled_hook( 'event_test_action'); // clear anything else in the system
    wp_schedule_single_event( time() + 10, 'event_test_action');

add_action('event_test_action', 'event_test_action');
function event_test_action(){
    update_option('test_action_option', 'Ran');
share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.