you need to adjust this a bit more - this should work
Code:
[ -x /usr/lib64/plesk-9.0/maxlifetime ] && [ -d /var/www/vhosts/[REDACTED]/whmcs-php-temp ] && /usr/lib64/plesk-9.0/php_session_cleaner /var/www/vhosts/[REDACTED]/whmcs-php-temp $(/usr/lib64/plesk-9.0/maxlifetime)
there is no need and real benefit, to let it run more than once every hour
If you have lots of sites on your server that store session files in custom directories, you can also use a cronjob like this:
Code:
/usr/bin/find -O3 /var/www/vhosts -type f -name 'sess_*' -mmin +1440 -delete &> /dev/nul
We use that on several systems but only let it run once a day, because it may take a couple minute to crawl through the whole vhosts directory tree
Yeah, yeah, I know, not 100% save this command, but in reality, who or what else would create and use files with names that start with "sess_" ?