StockDocs/scraper/run_scraper.sh

15 lines
572 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# ------------------------------------------------------------------
# run_scraper.sh
#
# Activates the venv *implicitly* by calling the venvs 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 venvs Python directly.
"${VENV_DIR}/bin/python" "${SCRIPT}" # output is redirected by cron