13 lines
544 B
Bash
Executable File
13 lines
544 B
Bash
Executable File
#!/bin/bash
|
|
# V42 Real MQL Scoring Scheduled Job
|
|
OUT=/var/www/html/api/mql-scoring-status.json
|
|
# Get live scoring from PHP endpoint
|
|
RES=$(curl -sk --max-time 8 https://weval-consulting.com/api/mql-scoring-agent.php 2>/dev/null)
|
|
# Extract key fields
|
|
if [ -n "$RES" ]; then
|
|
echo "$RES" > $OUT
|
|
MQL=$(echo "$RES" | python3 -c "import json,sys; print(json.load(sys.stdin).get('mql_auto_scored',0))" 2>/dev/null)
|
|
echo "$(date -Iseconds) mql_auto=$MQL" >> /tmp/mql-scorer-cron.log 2>/dev/null || true
|
|
fi
|
|
cat $OUT 2>/dev/null | head -c 200
|