Created
January 9, 2025 21:49
-
-
Save mekb-turtle/3025c94694b82334cc2ac6d380a87d59 to your computer and use it in GitHub Desktop.
cronjob to update packages (uses checkupdates)
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
# /etc/crontab: configuration file for cron | |
# See cron(8) and crontab(5) for details. | |
# m h dom mon dow user command | |
0 * * * * root /root/idlenice /root/fetch-updates | |
@reboot root /root/idlenice /root/fetch-updates |
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
#!/bin/bash | |
pidof -sq pacman || { ping example.com -qw2 -c1 && checkupdates -d; } |
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
#!/bin/sh | |
nice -n 19 ionice -c 2 -n 7 "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment