Created
May 12, 2021 10:58
-
-
Save vi7/8b040c09433d471e63996bc5ad28b93e to your computer and use it in GitHub Desktop.
Cronjob for the Gradle Daemon logs cleanup
This file contains hidden or 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
# Cleanup Gradle Daemon logs older than 3hr (180min) | |
# NOTE: Change path to the .gradle/daemon as needed | |
05 */1 * * * root /usr/bin/find /var/lib/jenkins/.gradle/daemon/ -type f -mmin +180 -exec rm -vf '{}' \; | |
# Cleanup Gradle Daemon empty dirs | |
# NOTE: Change path to the .gradle/daemon as needed | |
10 */1 * * * root /usr/bin/find /var/lib/jenkins/.gradle/daemon/ -type d -empty -exec rm -vrf '{}' \; || true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment