Browse Source

monica cron

master
Bastiaan Stroosnijder 6 months ago
parent
commit
38a76af5ce
  1. 1
      roles/homelab-service-monica/tasks/main.yml
  2. 12
      roles/homelab-service-monica/templates/homelab-monica-cron.service.j2
  3. 9
      roles/homelab-service-monica/templates/homelab-monica-cron.timer.j2

1
roles/homelab-service-monica/tasks/main.yml

@ -11,6 +11,7 @@
services:
- homelab-monica.service
- homelab-monica-database.service
- homelab-monica-cron.timer
images:
- "{{ homelab_monica_image }}"
volumes:

12
roles/homelab-service-monica/templates/homelab-monica-cron.service.j2

@ -0,0 +1,12 @@
#jinja2: lstrip_blocks: "True"
{% set container_name = homelab_service_container_name['homelab-service-monica'] %}
[Unit]
Description=Run Monica artisan schedule:run
[Service]
Type=oneshot
SyslogIdentifier={{ container_name }}-cron
Environment="HOME={{ homelab_path }}"
ExecStart={{ homelab_container_exec }} exec {{ container_name }} php artisan schedule:run

9
roles/homelab-service-monica/templates/homelab-monica-cron.timer.j2

@ -0,0 +1,9 @@
[Unit]
Description=Run Monica artisan schedule:run every 1 mins
[Timer]
Unit=homelab-monica-cron.service
OnCalendar=*-*-* *:*:00
[Install]
WantedBy=timers.target
Loading…
Cancel
Save