-
Notifications
You must be signed in to change notification settings - Fork 0
/
.crontab
24 lines (21 loc) · 1.02 KB
/
.crontab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# requires cron and postfix
# run crontrab -e and past this:
LOGFILE=/var/log/cron-apt.log
# 1. minute (0-59)
# | 2. hour (0-23)
# | | 3. day of month (1-31)
# | | | 4. month (1-12)
# | | | | 5. day of week (0-7: 0 or 7 is Sun, or use names)
# | | | | | 6. commandline
# | | | | | |
#min hr dom mon dow command
00 13 * * * . /etc/profile && sudo apt-get check && sudo apt-get update && sudo apt-get autoremove --purge && sudo apt-get autoclean
#To check every */time you must use e.g. */2 to check every 2 min or any other time value.
#If you want to automatically reboot your computer upon a successful upgrade, append '&& reboot' to the above line.
#https://wiki.archlinux.org/index.php/Update_packages_from_crontab
@reboot rm -rf "$HOME/.cache/" 2>/dev/null
@reboot rm -rf "$HOME/.thumbnails" 2>/dev/null
@reboot rm -rf "$HOME/.local/share/Trash" 2>/dev/null
@reboot rm -rf $HOME/.wine/drive_c/windows/temp/* 2>/dev/null
@reboot bash $HOME/bin/cleanup_boot.sh