• GoDaddy Community
  • Managed WordPress Hosting
  • Managed WordPress Hosting

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    WP-Cron event not working

    EDIT: Solved this by adding define('ALTERNATE_WP_CRON', true); to wp-config.php

    In my staging site I've created a cron event in functions.php, and according to the WP Crontrol plugin, the event (yo_send_email) executes successfully both when run manually and using wp_schedule_event() ; however, it doesn't do what it's supposed to (send an email).

    add_action( 'yo_send_email', 'yo_send_mail');

    function yo_send_mail(){
    $message = "Test message";

    $wp_mail_result = wp_mail( 'ramtin.a@live.com', $message, $message );

    if ( true === $wp_mail_result ) {
    error_log( 'wp_mail returned true!' );
    } else {
    error_log( 'wp_mail had an error!' );

    Debug is enabled and nothing's being written to the log, so it seems that wp_mail() isn't failing but it's not being called at all

    1 REPLY 1
    Super User II



    I'm not going to lie. I love a lot of the features that MWP offers but I don't like the platform it's hosted on. There are far too many limitations that interfere with the normal working of a WordPress site. I've had cron issues, CSS issues, cache issues... the platform has potential, it's just not where the rest of the world's MWP offerings are at the moment. It's an affordable alternative to those. That's it.

    I would honestly suggest getting a standard cPanel account and just use Manage WP. All the same features and better user experience and you'll still be in the GoDaddy environment. I would also suggest if you want the best experience to consider Business Hosting. It's like having all the resources (for yourself, not shared) of a VPS with none of the server admin headaches.

    I am a GoDaddy End User - Just Like You
    * Please note that I DO NOT answer private messages. Please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. If you contact me via PM for help, I will give you a price quote for my personal services. Thanks! *

    Once your issue is resolved,
    please be sure to come back and click accept for the solution

    Get Better Support on the Community Boards!
    Etiquette When Asking for Help from the Community