Chrome Hangs When running Kantu from SQL Server Job or Command Line

I run a batch file which contains the following code “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” “file:///C:/Downloads/JWCC.html?macro=JWCC&direct=1&savelog=log1.txt&closeKantu=1&closeBrowser=1”

The batch file is called from SQL Server Job Agent with proper credentials
image

The file seems tor run and the log file is created, but then the job just hangs as chrome doesn’t fully close.

I have tried all sorts of workarounds including using XType (gives errors when I try XType).
I am having issues using scheduled tasks as well, but would be ok if I can get it to run like that.

image

Here is a screencast to show the behavior
https://www.screencast.com/t/MvvUgNcG

This the result of the logfile
Status=OK

[status] Playing macro JWCC
[info] Executing: | bringBrowserToForeground | | |
[info] Macro completed (Runtime 2.31s)

If I could get this to work without hanging, it would be a huge help to automating several processes we have. I would be ok with running as a scheduled task but definitely not prefered for a variety of reasons.

If you start the batch file manually, does it work then?

Yes it does … I am currently working on a solution with powershell that seems like it might work.

Ok. Please let us know what you find out. The “Security” (RunAs) section of the task scheduler page is maybe also helpful… it seems Chrome does not have the right permissions when started from the SQL Server job (just a guess).