Convert from crond to supercronic

This commit is contained in:
Adam Outler
2025-11-22 01:29:50 +00:00
parent f0abd500d9
commit e3458630ba
13 changed files with 46 additions and 33 deletions

View File

@@ -7,10 +7,10 @@ export INSTALL_DIR=/app
if grep -q "cron_restart_backend" "${LOG_EXECUTION_QUEUE}"; then
killall python3
sleep 2
/services/start-backend.sh &
/services/start-backend.sh >/dev/null 2>&1 &
# Remove all lines containing cron_restart_backend from the log file
# Atomic replacement with temp file
grep -v "cron_restart_backend" "${LOG_EXECUTION_QUEUE}" > "${LOG_EXECUTION_QUEUE}.tmp" && \
mv "${LOG_EXECUTION_QUEUE}.tmp" "${LOG_EXECUTION_QUEUE}"
grep -v "cron_restart_backend" "${LOG_EXECUTION_QUEUE}" > "${LOG_EXECUTION_QUEUE}.tmp"
mv "${LOG_EXECUTION_QUEUE}.tmp" "${LOG_EXECUTION_QUEUE}"
fi