Last active
March 2, 2020 07:49
-
-
Save ender503/f2aa96af5a20e337a97c87ab22355ddf to your computer and use it in GitHub Desktop.
delete cache scheduler
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
#!/bin/bash | |
# delete buildkite cache | |
rm -rf /var/lib/buildkite-agent/builds/ | |
rm -rf /var/lib/buildkite-agent/.cache/* | |
# delete docker cache | |
docker system prune -f |
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
# location: | |
# /etc/systemd/system/delete-caches.service | |
[Service] | |
ExecStart=/usr/local/bin/delete-caches |
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
# location: | |
# /etc/systemd/system/delete-caches.timer | |
[Timer] | |
OnCalendar=*-*-* 0:00:00 | |
Unit=delete-caches.service | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place these configs and scripts to the specific location
Start timer