Jump to content

DailyCronJob Hook not being called in new addon

Recommended Posts

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)) {

   function update() {


function myaddon_update()



This is the code in my hooks.php file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated