From 6b0b6e587c8a92c87dc6dc5a5d746f66ef2e43a3 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Sat, 7 May 2022 16:00:57 +0200 Subject: [PATCH] No buffering for log --- scripts/logged_server_setup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/logged_server_setup.py b/scripts/logged_server_setup.py index b8ba0a6..c126ccd 100644 --- a/scripts/logged_server_setup.py +++ b/scripts/logged_server_setup.py @@ -75,14 +75,13 @@ step("Setup update cron jobs") user_update_script = script_dir / "user_update.py" user_update_log = logs_dir / "user_update.log" +# Every Sunday at 04:00 +run(f'echo "0 4 * * 0 admin python3 -u {user_update_script} &>> {user_update_log}" | sudo tee -a /etc/crontab') root_update_script = script_dir / "root_update.py" root_update_log = logs_dir / "root_update.log" - -# Every Sunday at 04:00 -run(f'echo "0 4 * * 0 admin python3 {user_update_script} &>> {user_update_log}" | sudo tee -a /etc/crontab') # Every Sunday at 04:15 -run(f'echo "15 4 * * 0 root python3 {root_update_script} &>> {root_update_log}" | sudo tee -a /etc/crontab') +run(f'echo "15 4 * * 0 root python3 -u {root_update_script} &>> {root_update_log}" | sudo tee -a /etc/crontab') step("Install latest Poetry packages") poetry_install_latest(script_dir)