Cron Job to auto clean Magento Session files to save inodes
Is it good to add the below code in /var/spool/cron/root to cleanup the Magento Session files regularly?
Kindly advice. Thanks
0 0 * * * find /tmp -name 'sess*' -mtime +1 -exec rm -v {} \;Kindly advice. Thanks
-
@Infopro Thanks for your reply. But since I am selling Shared Hosting on my servers, I won't be able to tuneup each Magento installation and I want to setup a Cron to delete the files. So can you please tell me how about my code? Will it work and safe ? 0 0 * * * find /tmp -name 'sess*' -mtime +1 -exec rm -v {} \;0 -
Hello @Logesh K, Can you check if the /usr/local/cpanel/scripts/clean_user_php_sessions script is cleaning up the older session files? We document how to use this script on the link below: MultiPHP INI Editor for WHM documentation. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments