title: wp_schedule_event hook scheduled but not working
body: <p>I'm trying to trigger cron job from WordPress Plugin that I'm writing (It's gonna take all new Products and export them to CSV every day) so the problem is that  when I'm put this code in functions.php all working great and the code is valid but from the plugin folder it's scheduled and I can see it  (with Cron View Plug-in) but not executed.. I found another same questions but there was no answer..
  It seems like it's not really been triggered or something is blocking it..
  take a look at my code..</p>
  
  <pre><code>function csv_init(){
  add_action('my_hourly_event', 'Download_CSV_with_args');
  }
  
  function starthere(){
  // some code here
      $file = $_SERVER['DOCUMENT_ROOT'].'/wp-content/csv_settings.php';
                              $content = serialize($args);
                              file_put_contents($file, $content);
  
                          wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_hourly_event');
  
                              $schedule = wp_get_schedule( 'my_hourly_event' );
                              echo  wp_next_scheduled( 'my_hourly_event' ).'&lt;br&gt;';
                          if ($schedule){
                              echo '&lt;h3&gt;The "'.$schedule.'" Cron Job is running..&lt;/h3&gt;';
                           }else {
                              echo '&lt;h3&gt;There are no Cron Jobs that running..&lt;/h3&gt;';
                           }
  
  }
  
  function Download_CSV_with_args() {
          //execution of my code
  }
  </code></pre>