Delete files in the cron php folder
You need to clean the specified folder of files every 6 hours. I can't find a solution anywhere. Before that, I did not work with the crown
3 answers
Shell command to delete files in a directory (if there are no nested directories in that directory):
rm /путь/к/каталогу/*
This command should be executed by specifying its frequency. i.e., for "once every six hours", the line in the file crontab
should look something like this:
0 */6 * * * rm /путь/к/каталогу/*
I.e., in 0
minutes every six hours (second field - */6
) every day of the month (third field - *
) every month (fourth field - *
) regardless of the day of the week (fifth field - *
) execute the command rm ...
(last, sixth field).
find $LOCATION -name $REQUIRED_FILES -type f -mmin +360 -delete
Where +360
number of minutes (360 minutes == 6 hours)
find /путь к каталогу/ -type f -mmin +360 -delete
The script for deleting files older than 360 minutes regularly runs the settings during the creation of the crown, if you are in ispmgr