Created
October 17, 2022 02:16
-
-
Save shsteven/c74e7e8e7261b3e1656f30823e10ad2b to your computer and use it in GitHub Desktop.
Crontab Docker Pruning
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
# See https://askubuntu.com/questions/440821/execute-script-when-disk-space-is-low | |
@daily sh -c "if [ $(df / --output='pcent' | grep -o "[0-9]*") -gt 90 ]; then docker system prune -af; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment