Run Python App locally with bat file or windows task scheduler

  1. install miniconda on your computer, and configure the virtual python environment for your app
  2. Create your app and test it works
  3. Create the bat file for your apps, mytask.bat

    start http://127.0.0.1:8050/
    call C:\Users\%USERNAME%\anaconda3\Scripts\activate
    call conda activate dashboards
    python “C:\Users\%USERNAME%\Documents\ex1.py”
    cmd /k

  4. test this bat file manual with command line
  5. add the task to windows task scheduler, and make it to SYSTEM Account