Hello all,
I want session files older than 30 minutes automatic deleted and according to this information found in php.in I have to create cronjob or a script
Code:
; NOTE: If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method.
; For example, the following script would is the equivalent of
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm
My path to session is /var/lib/php/session so I tried the following possibilities:
[root@obelix ~]# crontab -e
Code:
*/30 * * * * root find -cmin +30 | xargs rm /var/lib/php/session &> /dev/null
Code:
*/30 * * * * root /var/lib/php/session find -cmin +30 | xargs rm /var/lib/php/session &> /dev/null
Code:
*/30 * * * * cd /var/lib/php/session find -cmin +30 | xargs rm &> /dev/null
None of them work.
Who knows the right syntax ?
__________________
With Respect, Robert
------------------------------------------------
Fedora 15 - ISPConfig v3.0.3.3
On Dell Optiplex GX270, Pentium 4, 2.8 GHz, 1024 Mb
Recent comments
1 day 47 min ago
1 day 52 min ago
1 day 5 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 18 hours ago
2 days 1 hour ago
2 days 5 hours ago
2 days 7 hours ago