How to remove old jobs and/or .tmp files from Pipeline Pilot server

      Our Pipeline Pilot 8.5 server has a relatively small data partition that periodically needs to be cleaned up to make room for real work. The current method involves manually deleting all jobs that were not run "today". Additionally, there are nearly 70K .tmp files in the Scitegic folder on that drive. We have configured the server to only retain 50 jobs, and we really can't go much below that due to the number of automated processes that run using Pipeline Pilot. I have two related questions:

1) Is there a (relatively) easy way to automatically delete jobs older than some arbitrary age?

2) Is there a (relatively) easy way to automatically delete .tmp files?

These problems are not rocket science, but I am trying to avoid redesigning the wheel.

Thank you in advance.

Alan