Files
wevads-platform/scripts/brain_cron.sh
2026-02-26 04:53:11 +01:00

22 lines
538 B
Bash
Executable File

#!/bin/bash
# Brain Engine Auto Test - Cron Job
# Teste automatiquement les configs et log les résultats
LOG_FILE="/var/log/brain_auto_test.log"
LOCK_FILE="/tmp/brain_cron.lock"
# Éviter les exécutions simultanées
if [ -f "$LOCK_FILE" ]; then
echo "$(date): Already running, skipping" >> $LOG_FILE
exit 0
fi
touch $LOCK_FILE
echo "$(date): Starting Brain Auto Test" >> $LOG_FILE
php /opt/wevads/scripts/brain_auto_test.php >> $LOG_FILE 2>&1
echo "$(date): Completed" >> $LOG_FILE
echo "---" >> $LOG_FILE
rm -f $LOCK_FILE