From b9046163dcf312ac24704cbfe101743589890543 Mon Sep 17 00:00:00 2001 From: Nicholas McDonnell <50747025+mcdonnnj@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:08:14 -0500 Subject: [PATCH] Add a cron job to restart ncats-webd daily This adds a configuration to create a cron job in the cyhy_dashboard Ansible role that will restart the ncats-webd service daily at ~midnight EST. This is done because the team using the dashboard has been periodically requesting manual restarts of the service due to the dashboard becoming slow or unresponsive over time. Once the service is restarted the dashboard returns to normal usability. Hopefully restarting it daily will be a tolerable band-aid for the performance issues. --- ansible/roles/cyhy_dashboard/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ansible/roles/cyhy_dashboard/tasks/main.yml b/ansible/roles/cyhy_dashboard/tasks/main.yml index c0567db4..6dcd5a69 100644 --- a/ansible/roles/cyhy_dashboard/tasks/main.yml +++ b/ansible/roles/cyhy_dashboard/tasks/main.yml @@ -61,3 +61,11 @@ ansible.builtin.service: name: ncats-webui state: started + +- name: Create a cron job to restart the ncats-webd service daily + ansible.builtin.cron: + hour: '5' + job: systemctl restart ncats-webd + minute: '0' + name: "Restart ncats-webd service daily" + user: root