编辑当前用户的crontab文件

crontab -e

添加以下行以每天凌晨1点执行清理

0 1 * * * /usr/bin/find /tmp -type f -mmin +120 -exec rm -f {} \;