add cron job

This commit is contained in:
Ștefan Talpalaru 2020-06-28 20:16:01 +02:00
parent c46700f889
commit 9ebad060dc
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
3 changed files with 16 additions and 0 deletions

View File

@ -31,3 +31,7 @@ beacon_node_restart_window_sec: 120
# general container management
compose_recreate: false
# shared testnet cron job
beacon_node_shared_testnet_cron: false

11
tasks/cron.yml Normal file
View File

@ -0,0 +1,11 @@
---
# "cron.name" should not be changed, or a new cron job will be created for the new name,
# in addition to the old one.
- name: "Shared testnet: periodic container restart Cron job"
cron:
name: "shared testnet restart"
minute: "10"
hour: "0,6,12,18"
job: "PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin'; cd {{ beacon_node_cont_vol }}; docker-compose --compatibility run --rm --name {{ beacon_node_cont_name }}-build-run beacon_node --build; docker-compose restart -t 60"
when: beacon_node_shared_testnet_cron

View File

@ -2,5 +2,6 @@
- import_tasks: install.yml
- import_tasks: compose.yml
- import_tasks: container.yml
- import_tasks: cron.yml
- import_tasks: firewall.yml
- import_tasks: consul.yml