Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example cron task for auto-removing old downloads on macOS Big Sur and Catalina
# Cron on macOS 10.14+ requires Full Disk Access permissions in
# System Preferences->Security & Privacy.
# More here:
# 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