#!/bin/bash
# Cron wrapper for chess_shorts bot. Runs every 6 hours.
set -e
export PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
cd /home/working/public_html/chess_shorts

if [ -x /bin/python3.12 ]; then
    PY=/bin/python3.12
elif command -v python3.12 >/dev/null 2>&1; then
    PY=$(command -v python3.12)
else
    PY=/bin/python3
fi

"$PY" /home/working/public_html/chess_shorts/bot/generate_short.py "$@"
