add cron job
This commit is contained in:
parent
c46700f889
commit
9ebad060dc
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue