I want to remove the PHP7.1 session file frequently, if I don't remove the files the new PHP session is not generating. So I want to set up the cron job to remove the PHP session.
Session files are saving in the path : /var/lib/php/sessions
Help me to set up the cron job. Thanks.
man crontab
from command line instructions are there. you edit your roots crontab withsudo crontab -e
find /var/lib/php/sessions -type f -cmin +60 -delete
to remove sessions older then 1 hour.