Example cron task for auto-removing old downloads on macOS Big Sur and Catalina
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cron on macOS 10.14+ requires Full Disk Access permissions in | |
# System Preferences->Security & Privacy. | |
# More here: https://apple.stackexchange.com/a/372810/42898 | |
# Removes downloads older than 14 days. Runs every 6 hours | |
45 */6 * * * find ~/Downloads -maxdepth 1 -mtime +14 -exec rm -rf {} \; >> /tmp/cron.log 2>&1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment