1
0
Fork 0
forked from OpenNeo/impress

Install cron job to run rails public_data:commit weekly in production

The Sunday 1:15am time was chosen pretty arbitrarily; I think having it
happen at a "start of week" kind of weekday is clarifying for weekly
tasks, but I chose ":15" mostly to mitigate that thing where cron jobs
all run on the hour at the same time, while still feeling normal :p
This commit is contained in:
Emi Matchu 2024-03-01 13:20:59 -08:00
parent 98dd9ec782
commit e1a5eaeb68

View file

@ -437,6 +437,15 @@
mode: "755" mode: "755"
state: directory state: directory
- name: Create weekly cron job to run `rails public_data:commit`
become_user: impress
cron:
name: "Impress: commit public data"
weekday: "0" # Sunday
hour: "1" # 1:15am
minute: "15" # 1:15am
job: "cd /srv/impress/current && bin/rails public_data:commit[scheduled]"
handlers: handlers:
- name: Reload nginx - name: Reload nginx
systemd: systemd: