am_event hourly not working?

Discussion in 'Customization & add-ons' started by vincitygialam, Oct 5, 2018.

  1. vincitygialam

    vincitygialam New Member

    Joined:
    Oct 5, 2018
    Messages:
    1
    Hello I have been working with Amember v 4 and now am trying to get the am_event hourly event to trigger but it seems to not be available in v4? Perhaps I am doing something wrong this is what I have
    In the site.php file i have added

    Am_Di::getInstance()->hook->add(Am_Event::HOURLY, 'checkOld');
    function checkOld(Am_Event $event){
    $file = ("test.log");
    $today = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
    fileputcontents($file, $today);
    }

    When I trigger my function in other ways it works just fine so the problem is with the hook and I cant seem to figure it out. Please inform if this hook is available in v4 since the documents show it should be. Thx for any help I appreciate your time.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Hello,

    Event Am_Event::HOURLY is available in all aMember version since 4.0.0.

    Do you mind to contact us in helpdesk?
    https://www.amember.com/support

    We will check what can be wrong.

    Thanks.

Share This Page