The code i am pasting is supposed to run the function exporting once on activation of plugin and then hourly. But it doesn't run on activation nor hourly. I do see it in the list of cron jobs that are scheduled.

  register_activation_hook(__FILE__, 'my_activation');
  register_deactivation_hook( __FILE__,'run_on_deactivate');

   function run_on_deactivate() {

 function my_activation() {
 //exporting(); if i uncomment this line the function runs once
wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_excel_event');
  add_action('my_excel_event', 'exporting');

I know my site is getting page visits, what can be the reason for function not running at all in wp_scheduled_event ?


Browse other questions tagged or ask your own question.