mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
add basic crontabs to be added for base user and root
This commit is contained in:
parent
d81624fcfa
commit
403c712eb6
8 changed files with 59 additions and 0 deletions
45
.config/cron/README.md
Normal file
45
.config/cron/README.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
# file structure
|
||||
|
||||
```
|
||||
.
|
||||
├── README.md
|
||||
├── root
|
||||
└── user
|
||||
```
|
||||
|
||||
## root (super user) cron jobs
|
||||
|
||||
```
|
||||
.
|
||||
├── README.md
|
||||
└── root
|
||||
├── crontab
|
||||
└── daily.sh
|
||||
```
|
||||
|
||||
Anything in `root/daily.sh` gets run by `root` every day.
|
||||
- Currently, this just runs `apt-get update/upgrade` as root to avoid sudo passwords.
|
||||
|
||||
`root/crontab` is the file that is copied into `/var/at/tabs` on macOS and `/etc/crontab.d/` on Linux.
|
||||
|
||||
## User cron jobs
|
||||
|
||||
```
|
||||
.
|
||||
└── user
|
||||
├── crontab
|
||||
├── daily.sh
|
||||
├── go_home.sh
|
||||
├── lunch.sh
|
||||
└── self_care_time.sh
|
||||
```
|
||||
|
||||
The "user" is the user that ran last ran `onboardme`. All scripts below will run as that user.
|
||||
|
||||
`user/lunch.sh` gets run at lunch time (noon) by the user, for reminders.
|
||||
`user/daily.sh` gets run daily by the user right after lunch reminders.
|
||||
- Currently, this runs `onboardme` for updating dot files, OS packages (brew, pip3.12, pipx), fonts, and neovim packages.
|
||||
`user/go_home.sh` gets run at at 17:10 to remind the user to go home.
|
||||
`user/self_care_time.sh` gets run at at 22:30 to remind the user to do self care tasks.
|
||||
|
||||
`user/crontab` is the file that is copied into `/var/at/tabs` on macOS and `/etc/crontab.d/` on Linux.
|
1
.config/cron/root/crontab
Normal file
1
.config/cron/root/crontab
Normal file
|
@ -0,0 +1 @@
|
|||
0 12 * * * ~/.config/cron/daily_root.sh
|
5
.config/cron/root/daily.sh
Normal file
5
.config/cron/root/daily.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
echo "apt upgrades start at:"
|
||||
date
|
||||
time apt-get update && time apt-get upgrade -y
|
||||
echo "apt upgrades complete at:"
|
||||
date
|
4
.config/cron/user/crontab
Normal file
4
.config/cron/user/crontab
Normal file
|
@ -0,0 +1,4 @@
|
|||
0 12 * * * ~/.config/cron/lunch.sh
|
||||
30 12 * * * ~/.config/cron/daily.sh
|
||||
10 17 * * * ~/.config/cron/go_home.sh
|
||||
30 20 * * * ~/.config/cron/self_care_time.sh
|
1
.config/cron/user/daily.sh
Normal file
1
.config/cron/user/daily.sh
Normal file
|
@ -0,0 +1 @@
|
|||
onboardme -s dot_files -s packages -s font_setup -s neovim_setup -p brew -p pipx -p pip3.12 -g default -g default
|
1
.config/cron/user/go_home.sh
Normal file
1
.config/cron/user/go_home.sh
Normal file
|
@ -0,0 +1 @@
|
|||
say "Time to wrap up and go shopping for dinner!"
|
1
.config/cron/user/lunch.sh
Normal file
1
.config/cron/user/lunch.sh
Normal file
|
@ -0,0 +1 @@
|
|||
say "Perhaps it's time for a bit of a break. Maybe get a snack."
|
1
.config/cron/user/self_care_time.sh
Normal file
1
.config/cron/user/self_care_time.sh
Normal file
|
@ -0,0 +1 @@
|
|||
say "time to do a self care task. You can brush your teath, do your facial care routine, tend to your hands and feet, and change into jammies."
|
Loading…
Add table
Add a link
Reference in a new issue