Jump to content

refresh homefeatured with a cron job


DegustibusGbR

Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

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('*');
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...