使用以下命令创建批处理文件:
c:\__full_path_to_virtualenv__\Scripts\activate.bat && python __full_path_to_python_script__.py
&&表示如果command1成功完成,则运行command2.
然后将该批处理文件设置为要运行的脚本.您不需要在task scheduler中设置任何附加参数(或者您也可以在批处理文件中设置它们),如果脚本必须从特定目录读/写并且使用相对路径,则可以设置Start in.