Drupal 8. How to clear cache at 12 am? Or another specific hour, for example 2pm, 7pm etc.
Asked
Active
Viewed 926 times
2 Answers
2
You can do it outside of Drupal, using a cron job on your server to call drush cr
for your site.
In case you are not familiar with cron, please refer here: https://opensource.com/article/17/11/how-use-cron-linux
Example:
1. Edit crontab:crontab -e
0 0 * * * cd <path_to_your_document_root> && drush cr

Kien Nguyen
- 2,616
- 2
- 7
- 24
2
Check out also on CacheFlush module: https://www.drupal.org/project/cacheflush/

MilanG
- 6,994
- 2
- 35
- 64