I have a widget
class Xwidget extends WP_Widget{
function cron_addB(){}
}
I want to run a cron job that calls that function from outside the class
function xxx_cron_activation() { ;
if ( !wp_next_scheduled( 'xxx_followers' ) ) {
wp_schedule_event(time(), 'hourly', 'xxx_followers');
}
}
add_action('wp', 'xxx_cron_activation');
add_action('xxx_followers',array('Xwidget',"cron_addB"));
Cron is being triggered but the function is not being executed