I am having an issue where my the hook for the DailyCronJob is not being called. I know cron is running as I get the email daily. It seems like the method is not being called to perform the update but if I call this from the browser it seems to work fine. What am I missing or doing wrong here?
class MyAddon_Hooks {
protected static $instance = NULL;
public static function get_instance()
{
if ( NULL === self::$instance )
self::$instance = new self;
return self::$instance;
}
function __construct() {
$files = array("addonfile.php");
foreach ($files as $f) {
if (file_exists($f)) {
include_once($f);
}
}
}
function update() {
Anveto::get_instance()->cron();
}
}
function myaddon_update()
{
MyAddon_Hooks::get_instance()->update();
}
add_hook("DailyCronJob",1,"myaddon_update");
This is the code in my hooks.php file.