As the title states, the data is updated every day. In order to reduce the access to the database, the data queried on that day is stored in the cache file, and the data will be updated the next day. How to delete the cache file at 00:00?
As the title states, the data is updated every day. In order to reduce access to the database, the data queried on that day is stored in the cache file, and the data will be updated the next day. How to delete the cache file at 00:00?
Timed taskscrontab
<code>#每天凌晨0点执行 00 00 * * * /server/php7.02/php /htdocs/example.web.com/action/post/push.php</code>
Should this be left to the system's crontab and php scripts, or thinkphp's cli mode?
If it is Linux, use crontab
If not, just write while. .
Recommend crontab
It is recommended to use scheduled task crontab+php script which is more suitable
crontab scheduled tasks, it is more reasonable to call the mession.php script