This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrontab.yml
52 lines (45 loc) · 1.85 KB
/
crontab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- hosts: all
vars_files:
- vars.yml
gather_facts: true
become: true
become_user: "{{ project_name }}"
tasks:
- cronvar:
name: MAILTO
value: "{{ cron_email }}"
user: "{{ project_name }}"
- name: Schedule 'Dump elections models' job
cron:
name: "Dump elections models"
minute: 5
job: "manage-py-command dumpdata elections election_snooper --indent 4 -o {{ project_root }}/code/every_election/data/elections.json"
- name: Schedule 'Scrape to find new elections' job
cron:
name: "Scrape to find new elections"
minute: 30
job: '/usr/local/bin/instance-tags "Env=prod" && /usr/local/bin/instance-tags "controller=True" && manage-py-command snoop'
- name: Schedule 'Run database backup' job
cron:
name: "Run database backup"
minute: 8
job: '/usr/local/bin/instance-tags "Env=prod" && /usr/local/bin/instance-tags "controller=True" && output-on-error ~/backup_db_to_s3.sh'
- name: "Schedule 'Rebuild Staging DB' job"
cron:
name: "Rebuild Staging DB"
hour: 4
minute: 45
job: '/usr/local/bin/instance-tags "Env=prod" && /usr/local/bin/instance-tags "controller=True" && output-on-error ~/rebuild_staging_db.sh'
- name: "Schedule 'Generate map layers and sync to S3' job"
cron:
name: "Generate map layers and sync to S3"
hour: 1
minute: 40
job: '/usr/local/bin/instance-tags "Env=prod" && /usr/local/bin/instance-tags "controller=True" && output-on-error ~/sync_map_layers_to_s3.sh'
- name: "Add NUTS1 tags to any new elections"
cron:
name: "Add NUTS1 tags to any new elections"
hour: 2
minute: 15
job: 'manage-py-command add_tags -u "https://ons-cache.s3.eu-west-1.amazonaws.com/NUTS_Level_1_(January_2018)_Boundaries.geojson" --fields ''{"NUTS118NM": "value", "NUTS118CD": "key"}'' --tag-name NUTS1'