#!/usr/bin/env bash # ------------------------------------------------------------------ # run_scraper.sh # # Activates the venv *implicitly* by calling the venv’s Python binary. # ------------------------------------------------------------------ # Absolute path to the venv – change only if you move the venv. VENV_DIR="/home/user/StockDocs/scraper/venv" # Absolute path to the script you want to run. SCRIPT="/home/user/StockDocs/scraper/cron_scraper.py" # Invoke the venv’s Python directly. "${VENV_DIR}/bin/python" "${SCRIPT}" # output is redirected by cron