How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
I created a custom plugin and I need to schedule add_action using Crontrol Plugin, the Setup class is from different php class. But the schedule action cant read the Crontrol even if I execute do_action('schedule') inside functions.php it is not working.
class Scheduler {
public $setup;
public function __construct()
{
add_action('scheduler', [$this, 'etf_scheduler_func']);
}
public function etf_scheduler_func() {
$this-setup = new Setup();
$this-setup-set_table();
}
}