• bugeyed

    (@bugeyed)


    Hi,

    I am using WP v2.9.2 and having an issue with wp_schedule_single_event not calling my intended function (mail sending). Using the wp-control plugin, I could see the cron entry. When I click on the “Do Now” link against the entry, it says that “Successfully executed the cron entry <my-function-name>” but I am not getting the mail (had separately tested the function). Any ideas what could be wrong here?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bugeyed

    (@bugeyed)

    Anyone?

    The cron deamon uses do_action_ref_array does not invoke a function, but a hook! So if you want your function to be called you can either add an action with the same name:

    add_action( 'my_function_name', 'my_function_name' );

    or create a new action:

    add_action( 'my_cron_hook', 'my_function_name' );

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wp_schedule_single_event not calling my function’ is closed to new replies.