/cron.d/php5

http://github.com/brinkman83/bashrc · #! · 7 lines · 6 code · 1 blank · 0 comment · 0 complexity · 38ad4ffd743224f6211259fa13bd7516 MD5 · raw file

  1. # /etc/cron.d/php5: crontab fragment for php5
  2. # This purges session files older than X, where X is defined in seconds
  3. # as the largest value of session.gc_maxlifetime from all your php.ini
  4. # files, or 24 minutes if not defined. See /usr/lib/php5/maxlifetime
  5. # Look for and purge old sessions every 30 minutes
  6. 09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm