[Unit] Description=ML Stock Trading Bot v9 After=network-online.target trading-watcher.service Wants=network-online.target [Service] Type=simple User=backule WorkingDirectory=/opt/services/bots/trading_bot/Stock_Bot ExecStart=/opt/services/bots/trading_bot/venv/bin/python3 /opt/services/bots/trading_bot/Stock_Bot/StockTrading.py --mode both --max-workers 16 Restart=on-failure RestartSec=30 StandardOutput=append:/opt/services/bots/trading_bot/Stock_Bot/trading.log StandardError=append:/opt/services/bots/trading_bot/Stock_Bot/trading.log EnvironmentFile=/opt/services/bots/trading_bot/.env Environment=HOME=/home/backule Environment=PYTHONUNBUFFERED=1 [Install] WantedBy=multi-user.target