0

For site a) I would like to set up a schedule "page and else"cache clear every day at midnight. For site b) I would like to set up a schedule full cache clear every Wednesday day at midnight.

I am using the modules Varnish and Expire (Cache Expiration) to clear node caches when events occur (added deleted node etc).

As far as I can tell Rules does not provide Time/Date as an event which can be used as a trigger.

I am looking to do this internally in Drupal rather than on the servers cron. Is there a simple way to achieve this?

  • I'm sure drush has some command to do it; once found put it in a cron job. – mikeytown2 May 18 '15 at 17:49
1

May be How can I schedule a rule to always be run at a specific hour of the day? can be useful , but using cron, build a module and in it's hook_cron function check for the current time, if it is your specific time use the cache_clear_all function and it's parameters to clear the page and else cache. just make sure that the cron is ran on Wednesday day at midnight. it's periodic run time should come to 24:59.

you can also check the clear drupal cache - php script for more options of clearing the cache statement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.