Back to Cron Helper
Recipelinuxmaintenancecleanupstorage
Clean Temporary Folder
Remove temporary files that haven't been accessed in 10 days.The `/tmp` directory can fill up with abandoned session files or temporary data. This command finds regular files (`-type f`) in `/tmp` that haven't been accessed in over 10 days (`-atime +10`) and removes them to free up inodes and disk space.
Cron Schedule
Every Day at Midnight
Runs once per day at 00:00 (midnight).0 0 * * *Command to Run
Copy and paste this command into your crontab or automation script
find /tmp -type f -atime +10 -deleteImplementation Examples
Unix/Linux Crontab
0 0 * * * /path/to/script.sh
Python (with schedule library)
schedule.every().day.at("00:00").do(job)Node.js (with node-cron)
cron.schedule('0 0 * * *', () => {
console.log('Running daily at midnight');
});Go (with robfig/cron)
c.AddFunc("0 0 * * *", func() { fmt.Println("Run daily at midnight") })GitHub Actions Workflow
- cron: "0 0 * * *"
Related Cron Recipes
Automate PostgreSQL Backups Daily
databasepostgresbackup
Automate MySQL Backups Daily
databasemysqlbackup
Automate MongoDB Backups Daily
databasemongodbbackup
Automate Redis RDB Snapshots
databaserediscache
PostgreSQL Vacuum Analyze
databasepostgresmaintenance