feat: add cron for flushing disk cache
This commit is contained in:
parent
e2405d9a14
commit
3794c3455c
1 changed files with 5 additions and 0 deletions
|
|
@ -9,5 +9,10 @@
|
|||
# disable swap
|
||||
@reboot swapoff -a
|
||||
|
||||
{% if type == 'vm' %}
|
||||
# flush caches every 2 hours
|
||||
0 */2 * * * echo 3 > /proc/sys/vm/drop_caches
|
||||
{% endif %}
|
||||
|
||||
# update packages between 3:15-3:30 am
|
||||
15 3 * * * sleep $(($RANDOM % 900)) && apk -U upgrade >/dev/null 2>&1 && apk clean cache && reboot -d 60
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue