cron job to remove expired products

Discussion in 'Customization & add-ons' started by ccwjames, Dec 28, 2016.

  1. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    I have a script that allows users to be able to use a custom script via a top button.
    A few users over the last year have stated that sometimes they cant use the button

    i noted that if i go into their profile and remove a "old/expired" product manually, sometimes this helps and allows the button be used.

    is there a way to set up a cron, every 15 mins to auto remove expired products?
  2. caesar

    caesar aMember Pro Developer Staff Member

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

    I guess access cache was not calculated for such users for some case. Common cron job should solve this issue.
    Did you setup external cron job?
    http://www.amember.com/docs/Cron

    Best Regards.
  3. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    yes but i want to remove any expired product from their accounts to test, i know can remove expired USERS but want to try products
  4. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    I am afraid there is not such feature. I can suggest to run Rebuild Core Database. It fix access cache.
    You can do it in admin interface at
    aMember CP -> Utilities -> Rebuild Db

Share This Page