Skip to content

Commit 9461e9c

Browse files
committed
add basic support for cron jobs
1 parent 58aa3c5 commit 9461e9c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

deploy/playbooks/04_cron.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- name: Scheduled tasks using the bot user
2+
hosts: intbot_app
3+
4+
tasks:
5+
- name: "Download pretalx data every hour"
6+
ansible.builtin.cron:
7+
name: "Download pretalx data every hour"
8+
minute: "5" # run on the 5th minute of every hour
9+
job: "make prod/cron/pretalx"
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
MAKE_APP="docker compose run app make"
12

23
echo:
34
"Dummy target, to not run something accidentally"
45

56
prod/migrate:
6-
docker compose run app make in-container/migrate
7+
$(MAKE_APP) in-container/migrate
78

89
prod/shell:
9-
docker compose run app make in-container/shell
10+
$(MAKE_APP) in-container/shell
1011

1112
prod/db_shell:
12-
docker compose run app make in-container/db_shell
13+
$(MAKE_APP) in-container/db_shell
1314

1415
prod/manage:
15-
docker compose run app make in-container/manage ARG=$(ARG)
16+
$(MAKE_APP) in-container/manage ARG=$(ARG)
17+
18+
prod/cron/pretalx:
19+
$(MAKE_APP) in-container/manage ARG="download_pretalx_data --event=europython-2025"
1620

1721
logs:
1822
docker compose logs -f

0 commit comments

Comments
 (0)