#StackBounty: #google-chrome #scheduled-tasks #windows-task-scheduler #python3 #selenium Task Scheduler does not launch chrome when Run…

Bounty: 50

I have Python script for web-scraping. I am running it using papermill and then I created a batch file that I use on task scheduler to run. This workflow was running fine until my virtual machine got updated. I am able to successfully run it manually or "Run only when user is logged on" without any error.

When the option Run whether user is logged on or not is selected, It just hangs at a step where it needs to open a browser to log in and then after 20-30 mintutes, It gives me time-out session error as below:

SessionNotCreatedException: Message: session not created
from timeout: Timed out receiving message from renderer: 600.000
  (Session info: chrome=93.0.4577.82)

Things I have tried:

  • I have checked the box "Run with Highest Privileges"
  • I have checked the version of chrome version and everything is up-to-date
  • Start in option is added already
  • Start only if the network connection is available has "Any Connection"
  • Trigger has the Enabled option checked

This is how my .bat file looks like:

@echo off
SET LOGFILE=C:pathlogslog-%date%.txt
echo on
call :logit >>%LOGFILE%
exit /b 0 

:logit 
echo "Activate the anaconda prompt for the remaining commands."
echo "Note that the ProgramData folder is a hidden item."
call C:pathScriptsactivate.bat

echo "Change directory at anaconda prompt to application location."
cd C:path

echo "Run the Python application"
python papermill.py 


echo "Use taskkill to end the geckodriver.exe task."
taskkill /im geckodriver.exe /f

exit
echo "Close the command prompt."

@timeout 6 >nul

Please suggest as I have tried


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.