title: Wordpress: wp-cron not working and not giving error in log
body: <p>This is a wp-cron I defined in function.php file, but I don't get any result in the error log, the event is in the cron list but if I launch it nothing happens.
  I have <code>define('WP_DEBUG', true);</code>
  And error log enabled on all levels in php.ini</p>
  
  <p>Does anybody know where am I doing wrong?</p>
  
  <pre><code>function cron_daily_whatever() {
    if (!wp_next_scheduled('check_daily_event')) {
      wp_schedule_event(time(),'daily','check_daily_event');
    }
  }
  
  function my_do_this_daily() {
      error_log('check');
  }
  
  add_action('wp','cron_daily_whatever');
  add_action('check_daily_event','my_do_this_daily');
  </code></pre>
  
  <hr>
  
  <p><strong>SOLUTION</strong>
  I used the snippet</p>
  
  <pre><code> file_put_contents(WP_CONTENT_DIR . '/my-debug.txt', "Response: ".$res."\n", FILE_APPEND);
  </code></pre>
  
  <p>to debug it. And it now works.</p>