A python script serving a Flask API that aggregates total lottery winnings from different lottos worldwide
- Setup virtual environment
python3 -m venv venv - Enable venv
source venv/bin/activate - Install requirements.txt
pip install -r requirements.txt
pm2 start <path-to-location>/lotto-aggregator/script.sh --interpreter=<path-to-location>/lotto-aggregatort/venv/bin/python3
- Fix permission
chmod +x <path-to-location>/lotto-aggregator/script.sh - Type
crontab -e - Put at the end of line
0 0 * * * <path-to-location>/lotto-aggregator/script.sh. Make sure to save it. - The script will run every day at 00:00 UTC to update the
total_winnings.json