From 4a2be95d98bad3b2a842e83dedb52025cd23b330 Mon Sep 17 00:00:00 2001 From: rem Date: Thu, 14 Dec 2023 15:10:07 +0100 Subject: [PATCH] o --- crontab | 2 +- entrypoint.sh | 10 ++-------- testFinal.py | 3 ++- 3 files changed, 5 insertions(+), 10 deletions(-) mode change 100644 => 100755 testFinal.py diff --git a/crontab b/crontab index ce9c1d4..41c1e11 100644 --- a/crontab +++ b/crontab @@ -1,2 +1,2 @@ -*/1 * * * * python3 -u /app/testFinal.py &> /app/cron_py.log +*/1 * * * * /app/testFinal.py */1 * * * * touch /app/cron_exist.cron diff --git a/entrypoint.sh b/entrypoint.sh index f81404c..1c6562e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,13 +9,7 @@ service cron status while true; do if [ -f "/app/cron_exist.cron" ]; then echo "YES CRON WORKS" - break; fi - - echo "CRON LOGS" - cat /app/cron_py.log - - sleep 10 + + sleep 60 done - -sleep infinity diff --git a/testFinal.py b/testFinal.py old mode 100644 new mode 100755 index 25ffcd4..00881d3 --- a/testFinal.py +++ b/testFinal.py @@ -1,3 +1,4 @@ +#!/usr/bin/python3 from sklearn.linear_model import LinearRegression import pandas as pd @@ -113,4 +114,4 @@ for user in dataUser: i+=1 logging.error("User nb "+str(i)+" finis") -logging.error("Exec Fini") \ No newline at end of file +logging.error("Exec Fini")