make cron configurable

This commit is contained in:
2024-11-18 10:45:10 +01:00
parent 314f315d58
commit 0926440161
3 changed files with 18 additions and 2 deletions

View File

@@ -42,6 +42,12 @@ seafile_syncs:
dir: /backup/Pictures
# A library-specific resync interval
resync_interval_days: 31
seafile_cron:
minute: "20"
hour: "23"
day: "*"
month: "*"
weekday: "*"
```
## Run in playbook

7
defaults/main.yaml Normal file
View File

@@ -0,0 +1,7 @@
---
seafile_cron:
minute: "20"
hour: "23"
day: "*"
month: "*"
weekday: "*"

View File

@@ -48,8 +48,11 @@
cron:
name: Seafile Mirror Service
job: "chronic pipx run seafile-mirror -c {{ seafile_mirror_dir }}"
hour: "23"
minute: "20"
minute: "{{ seafile_cron.minute }}"
hour: "{{ seafile_cron.hour }}"
day: "{{ seafile_cron.day }}"
month: "{{ seafile_cron.month }}"
weekday: "{{ seafile_cron.weekday }}"
- name: Ensure user systemd directory exists
file: