deleting php-sessions

Discussion in 'Installation' started by jjenkins, Oct 10, 2010.

  1. awylie

    awylie aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    41
    The /tmp directory in my WordPress install is filling up on a daily basis. I have to clear it on a daily basis. If not, aMember will not let me log in.

    How would I write the cron-job code to tell the server to clear the cache on and hourly basis?
  2. awylie

    awylie aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    41
    Think I found it. Hope this helps someone:

    #command line / shell script
    sudo find /tmp -depth -type f -atime +1 -exec rm {} \;

    #crontab
    0 0 * * * /usr/bin/find /tmp -atime +1 -exec /usr/bin/rm {} \;

Share This Page