DegustibusGbR Posted October 8, 2016 Share Posted October 8, 2016 Hi, Anyone knows how to set up a cron job to refresh the homefeatured module? It happens often that some product is disabled and it still appears in the homefeatured section until I manually enter the module configuration and press on the save button. Thanks Link to comment Share on other sites More sharing options...
Daresh Posted October 9, 2016 Share Posted October 9, 2016 Try to make a new php file in the modules directory, put this code in: <?php require_once('../../config/config.inc.php'); require_once ('homefeatured.php'); $m = new HomeFeatured(); $m->_clearCache('*'); And then run this file in a cron (not tested but I think it should work). 1 Link to comment Share on other sites More sharing options...
DegustibusGbR Posted October 11, 2016 Author Share Posted October 11, 2016 Thanks , it works like a charm after changing a bit the relative paths. I placed the php file in a folder under the modules directory and used your code with the changes mentioned above. <?php require_once('../../config/config.inc.php'); require_once ('../homefeatured/homefeatured.php'); $m = new HomeFeatured(); $m->_clearCache('*'); 1 Link to comment Share on other sites More sharing options...
Daresh Posted October 11, 2016 Share Posted October 11, 2016 I actually ment putting it in the homefatured module directory, not the "modules" directory, should be better to maintain, but both ways work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now