You should make sure that the crawler is able to be run on Windows server manually. And to note that to make sure selenium runs correctly, it should be on the top of all other applications.
Automatically run daily
Firstly, you need to write a Windows Shell script, for example, let’s name it start-crawler.bat,
python main.py
Then you should go to start menu of Window Server
From there, yous should choose “管理工具” or management tools
Then go to “任务计划程序”(Task plan program)
Then click on create task(创建任务), You should create a trigger(触发器) and an opertaion(操作)
In the operations part, you should add an operation that starts the start-crawler.bat bash script file we created previously.
It is really magical that when the task is run as scheduled, it is run silently – No browser window will show up!