Error occurs during task scheduler execution. (Windows 10)

Errors occur due to differences in task scheduler security options settings.

Windows 10 Pro 64
Firefox 67
Geckodriver v0.24.0
An error will occur when executing with the task scheduler.

  1. If security option “run only when user is logged on” is executed, it works normally.
  2. The following error occurs when executing the security option “Run when user is logged on or not”.

–Error message–
Test Cases / 0.Download10 FAILED.
org.openqa.selenium.WebDriverException: connection refused
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21: 07: 36.161Z’
System info: host: ‘*********5’, ip: '**0 .**4.**2.106 ‘,’ Windows 10 ‘, os.arch:’ amd64 ', os.version: ‘10 .0’, java.version: '1.8.0_181 ’
Driver info: driver.version: FirefoxDriver
remote stacktrace:

With the same settings, WIndows 7 is 1.2. Both will work.

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.firefox.FirefoxDriver as FirefoxDriver
import org.openqa.selenium.firefox.FirefoxOptions as FirefoxOptions
import org.openqa.selenium.firefox.FirefoxProfile as FirefoxProfile
import org.openqa.selenium.firefox.internal.ProfilesIni as ProfilesIni
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import com.kms.katalon.core.webui.driver.WebUIDriverType as WebUIDriverType
WebUIDriverType executedBrowser = DriverFactory.getExecutedBrowser()

switch (executedBrowser) {
case WebUIDriverType.FIREFOX_DRIVER:
// “Firefox”
ProfilesIni profile = new ProfilesIni()
FirefoxProfile FF = profile.getProfile(‘JoelUser’)
FirefoxOptions options = new FirefoxOptions().setProfile(FF)
System.setProperty(‘webdriver.gecko.driver’, ‘/geckodriver/geckodriver.exe’)
WebDriver driver = new FirefoxDriver(options)
// let Katalon Studio to use the WebDriver created here



Is there a solution?
Thank you.