diff --git a/roles/uptime-kuma/tasks/install.yml b/roles/uptime-kuma/tasks/install.yml index 431cae09cc4a07a3204192efc7f5c17eb08b1ad9..6eea2c64b823cc95ab9a3dcc960ae4932fd2f02a 100644 --- a/roles/uptime-kuma/tasks/install.yml +++ b/roles/uptime-kuma/tasks/install.yml @@ -38,3 +38,21 @@ import_role: name: _app_monit when: monit_request is defined and monit_request != '' + + - name: cron to stop uptime-kuma during the night + cron: + name: "stop uptime" + hour: "{{ uptime_stop_hour }}" + minute: "{{ uptime_stop_minute }}" + job: "/usr/bin/docker stop uptime-kuma" + tags: + - cron_uptime + + - name: "cron to start uptime-kuma during the night" + cron: + name: "start start" + hour: "{{ uptime_start_hour | mandatory }}" + minute: "{{ uptime_start_minute | mandatory }}" + job: "/usr/bin/docker start uptime-kuma" + tags: + - cron_uptime