mjhassanli
New member
- Joined
- Apr 30, 2020
- Messages
- 1
I need to remove files in the cache directory every specific hours of day.
I create a PHP, when I open this file anywhere in my browser It's possible, but I need something like cron job to run that script periodically every some hour.
This is my PHP file (remove-cache.php):
I used this command line in cron job: (not worked!)
but it has not been worked.
please help me to fix this cron job
I create a PHP, when I open this file anywhere in my browser It's possible, but I need something like cron job to run that script periodically every some hour.
This is my PHP file (remove-cache.php):
PHP:
<?php $files = glob('application/cache/*'); foreach($files as $file){ if(is_file($file)) unlink($file); } ?>
I used this command line in cron job: (not worked!)
Code:
/usr/local/bin/php /home/vitriini/domains/{myDomain}/public_html/remove-cache.php
please help me to fix this cron job