Old Job Clean up

Paul paul.conklin at cerner.com
Mon Apr 25 19:32:15 PDT 2011


Looking for suggestions.  I had to set my MaxJobs to 0 because of a bunch of queued up jobs taking me over 500 queued.  I thought about setting the MaxJobs to something insanely high like 10000 so CUPS will do a little bit of it's own clean up, but for the time being i'm planing on using cron.

for job in `find /var/spool/cups -type f -iname "c*" -mtime +1 | cut -f5 -d'/' | cut -f2 -d'c'`
        do
         if [[ `ls -l /var/spool/cups/d$job-* 2>/dev/null | wc -l` -eq 0 ]]
                then
                rm -f /var/spool/cups/c$job
        fi
done

That will take care of the c* files in the spool directory, but is there anything else I need to do to clean up?  I'm thinking I need to do something to help purge out the /var/cache/cups/jobs.cache file.  Do i need to worry about it?  Anything else I should be concerned about?




More information about the cups mailing list