SHARE
TWEET

Untitled

a guest Jan 21st, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM    Windows batch script to run 1+ Python program/scripts, sequentially, within their virtual environment. This can be called from Windows Task Scheduler.
  2.  
  3. set original_dir=%CD%
  4. set venv_root_dir="C:\Python-Venvs\env-name"
  5.  
  6. cd %venv_root_dir%
  7.  
  8. call %venv_root_dir%\Scripts\activate.bat
  9.  
  10. python your_python_script.py <arg1> <arg2> <arg3>
  11. installed_python_cli_program <arg1> <arg2> <arg3>
  12.  
  13. call %venv_root_dir%\Scripts\deactivate.bat
  14.  
  15. cd %original_dir%
  16.  
  17. exit /B 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top