bluefeds and sentinel: change crontabs
This commit is contained in:
parent
4c89933cd3
commit
d061963a1e
|
@ -451,12 +451,18 @@ systemctl --user enable container-caddy-vishwambhar container-gitea-chitragupta
|
||||||
### user crontab
|
### user crontab
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# always add ">/dev/null 2>&1" at the end of cronjobs
|
||||||
|
# to prevnet a `dead.letter` in $HOME/
|
||||||
|
|
||||||
|
|
||||||
# check if containers are running or not; restart if stopped
|
# check if containers are running or not; restart if stopped
|
||||||
*/5 * * * * bash /home/pratham/.scripts/_bluefeds/cron/pratham/maintenance.sh >/dev/null 2>&1
|
*/5 * * * * bash /home/pratham/.scripts/_bluefeds/cron/pratham/maintenance.sh >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# run Nextcloud cron
|
# run Nextcloud cron
|
||||||
*/5 * * * * podman exec -u www-data nextcloud-govinda /usr/local/bin/php -f /var/www/html/cron.php >/dev/null 2>&1
|
*/5 * * * * podman exec -u www-data nextcloud-govinda /usr/local/bin/php -f /var/www/html/cron.php >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Nextcloud: scan files for all users and perform cleanup
|
# Nextcloud: scan files for all users and perform cleanup
|
||||||
10 */2 * * * podman exec -u www-data nextcloud-govinda /usr/local/bin/php -f /var/www/html/occ files:scan --all >/dev/null 2>&1
|
10 */2 * * * podman exec -u www-data nextcloud-govinda /usr/local/bin/php -f /var/www/html/occ files:scan --all >/dev/null 2>&1
|
||||||
40 */2 * * * podman exec -u www-data nextcloud-govinda /usr/local/bin/php -f /var/www/html/occ files:cleanup >/dev/null 2>&1
|
40 */2 * * * podman exec -u www-data nextcloud-govinda /usr/local/bin/php -f /var/www/html/occ files:cleanup >/dev/null 2>&1
|
||||||
|
@ -466,12 +472,18 @@ systemctl --user enable container-caddy-vishwambhar container-gitea-chitragupta
|
||||||
### root crontab
|
### root crontab
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# always add ">/dev/null 2>&1" at the end of cronjobs
|
||||||
|
# to prevnet a `dead.letter` in $HOME/
|
||||||
|
|
||||||
|
|
||||||
# update fs database every 6 hours
|
# update fs database every 6 hours
|
||||||
* */6 * * * updatedb >/dev/null 2>&1
|
* */6 * * * updatedb >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# create zfs snapshots every Friday
|
# create zfs snapshots every Friday
|
||||||
0 0 * * 5 bash /home/pratham/.scripts/_bluefeds/cron/root/zfs-bak.sh >/dev/null 2>&1
|
0 0 * * 5 bash /home/pratham/.scripts/_bluefeds/cron/root/zfs-bak.sh >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# start scrub
|
# start scrub
|
||||||
# on the first Friday of every month
|
# on the first Friday of every month
|
||||||
# at 2100 hours
|
# at 2100 hours
|
||||||
|
|
|
@ -201,45 +201,30 @@ sudo reboot +0
|
||||||
### user crontab
|
### user crontab
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# pause torrents as a prep for zfs scrub
|
# always add ">/dev/null 2>&1" at the end of cronjobs
|
||||||
*/10 18 * * 5 [ $(date +\%d) -le 07 ] && bash /home/ubuntu/.scripts/transmission/pause_all.sh
|
# to prevnet a `dead.letter` in $HOME/
|
||||||
|
|
||||||
#0 0 * * * bash /home/ubuntu/.scripts/transmission/change_bandwidth_priority.sh
|
|
||||||
|
|
||||||
# remove after exam ends
|
|
||||||
#*/2 6,7 * * * bash /home/ubuntu/.scripts/transmission/pause_downloading.sh
|
|
||||||
#*/20 20 * * * bash /home/ubuntu/.scripts/transmission/resume_all.sh
|
|
||||||
|
|
||||||
# maintenance script
|
|
||||||
# [[ if zpool scrub is not running ]]
|
|
||||||
# -> [[ if containers are not running ]]
|
|
||||||
# -> start containers
|
|
||||||
* * * * * bash /home/ubuntu/.scripts/cron/pratham/maintenance.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### root crontab
|
### root crontab
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# ZFS snapshots
|
# always add ">/dev/null 2>&1" at the end of cronjobs
|
||||||
#0 * * * * bash /home/ubuntu/.scripts/cronjobs/root/zfs-bak.sh
|
# to prevnet a `dead.letter` in $HOME/
|
||||||
|
|
||||||
|
|
||||||
# start scrub
|
# start scrub
|
||||||
# on every first Friday of the month
|
# on the first Friday of every month
|
||||||
# at 1845 hours
|
# at 1845 hours
|
||||||
45 18 * * 5 [ $(date +\%d) -le 07 ] && /sbin/zpool scrub libertine
|
45 18 * * 5 [ $(date +\%d) -le 07 ] && /sbin/zpool scrub libertine >/dev/null 2>&1
|
||||||
|
|
||||||
# wireguard (ProtonVPN)
|
|
||||||
#* * * * * bash /home/ubuntu/.scripts/cronjobs/root/proton-vpn.sh
|
|
||||||
|
|
||||||
# backup .torrent files
|
# backup .torrent files
|
||||||
# chmod and chown
|
# chmod and chown
|
||||||
# rm .macos files
|
# rm .macos files
|
||||||
30 18 * * * bash /home/ubuntu/.scripts/cronjobs/root/midnight.sh
|
30 18 * * * bash /home/ubuntu/.scripts/_sentinel/cron/root/midnight.sh >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# update fs database every 6 hours
|
# update fs database every 6 hours
|
||||||
* */6 * * * updatedb
|
* */6 * * * updatedb >/dev/null 2>&1
|
||||||
|
|
||||||
# maintenance script
|
|
||||||
#0 20 * * * bash /home/ubuntu/.scripts/cron/root/maintenance.sh
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue