Manage cron jobs through systemd, disable the package alert
This commit is contained in:
parent
6a051173d6
commit
751fd05b20
4 changed files with 21 additions and 3 deletions
|
|
@ -1,3 +1,3 @@
|
|||
#! /usr/bin/sh
|
||||
|
||||
crontab ./crontab
|
||||
systemctl --user enable --now backup.timer
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
@hourly /home/ohad/.local/bin/make-backup
|
||||
@hourly /home/ohad/.local/bin/package-alert
|
||||
10
.config/systemd/user/backup.service
Normal file
10
.config/systemd/user/backup.service
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Backup essential files
|
||||
Wants=backup.timer
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=%h
|
||||
ExecStart=%h/.local/bin/make-backup
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
10
.config/systemd/user/backup.timer
Normal file
10
.config/systemd/user/backup.timer
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Hourly backup job
|
||||
Requires=backup.service
|
||||
|
||||
[Timer]
|
||||
Unit=backup.service
|
||||
OnCalendar=hourly
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue