Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run Selenium from Windows Task Scheduler under the exact account, logon mode, working directory, browser, driver strategy and output paths that production will use. A task set to Run whether user is logged on or not has no interactive desktop, so code that works in a manually opened browser can hang or fail when scheduled. Make those dependencies explicit, test the non-interactive case, and move to Selenium Grid only when you need parallel machines or broader browser and operating-system coverage.

Before creating the task

Record the inputs that make the manual run succeed:

  • Absolute path to the script or test runner.
  • Language runtime and Selenium version.
  • Browser name, executable location and installed version.
  • Driver approach: Selenium Manager, a pinned driver, or an explicit Service path.
  • Configuration files, environment variables, credentials and test data.
  • Absolute log, screenshot and result directories.

Use absolute paths throughout. A scheduled process often starts with a different current directory than an interactive terminal.

Choose the account and logon mode

Run only when user is logged on

This mode has an interactive desktop and is closest to a manual run. It is useful for diagnosing browser-window problems, but it requires that user to remain logged on and is not equivalent to an unattended production job.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Dell PowerEdge T340 Tower Server, Windows 2019 STD OS, Intel Xeon E-2124 Quad-Core 3.3GHz 8MB, 32GB DDR4 RAM, 8TB Storage, RAID, Single PSU (Renewed)
  • 3.5 Inch Hot Plug Hard Drive PowerEdge T340 Tower Server Chassis
  • Microsoft Windows Server 2019 Standard Operating System
  • Processors: Intel Xeon E-2124 Quad-Core 3.3GHz 8MB CPU, Up To 4.3GHz Turbo
  • Memory: 32GB (2 x 16GB) DDR4 PC4-21300 2666MHz Unbuffered Memory
  • Hard Drive: 8TB (4 x 2TB) 7.2K RPM 6Gb/s SATA 3.5 Inch HDDs in RAID

Run whether user is logged on or not

This is the usual unattended setting. It is non-interactive: there may be no visible desktop, user prompts cannot be answered, mapped drive letters may not exist, and user-profile state can differ. Microsoft Q&A guidance commonly identifies missing user resources and non-interactive execution as causes of scheduled jobs that launch but never complete. Test this exact mode before relying on it.

Permissions checklist

  • The task account can read the script, imports, configuration and browser executable.
  • It can create or append logs, screenshots and result files.
  • It can read any profile directory Selenium uses.
  • It has access to required network shares; use UNC paths instead of mapped drive letters.
  • Its proxy, firewall and outbound policy permit the sites under test and any driver-management endpoints.

Create the Task Scheduler action

  1. Open Task Scheduler and create a task rather than a basic task when you need explicit security and trigger settings.
  2. On the General page, select the intended account. Choose the logon option that production will use. Do not validate an unattended deployment only with an interactive setting.
  3. Add a trigger for the required schedule. Set a useful start time and, if appropriate, configure a timeout or an action to stop a task that exceeds its expected duration.
  4. Add an action that launches the runtime or test runner directly. For Python, use the full path to python.exe in Program/script, the script and arguments in Add arguments, and the project directory in Start in. For another language, launch its installed runtime or test executable in the same way.
  5. Write logs and results to a known directory, not the interactive user’s desktop or Downloads folder.
  6. Save the task, supply the account password if Windows requests it, then use Run to test it.

Start with a tiny diagnostic that writes the time, username, current directory and environment to a file. Once that succeeds in the production logon mode, run the browser workflow.

A reliable Python Selenium entry point

This example uses Selenium Manager as the fallback driver manager and writes an explicit log. Adapt the URL, selectors and output path to your test.

from pathlib import Path
import getpass, logging, time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

ROOT = Path(r"C:seleniumjob")
LOG = ROOT / "logs" / "run.log"
LOG.parent.mkdir(parents=True, exist_ok=True)
logging.basicConfig(filename=LOG, level=logging.INFO,
                    format="%(asctime)s %(levelname)s %(message)s")

options = Options()
options.add_argument("--headless=new")
options.add_argument("--window-size=1440,1200")
# options.add_argument(r"--user-data-dir=C:seleniumprofilesjob")

driver = None
try:
    logging.info("user=%s cwd=%s", getpass.getuser(), Path.cwd())
    driver = webdriver.Chrome(options=options)
    driver.set_page_load_timeout(60)
    driver.get("https://example.com")
    logging.info("title=%s url=%s", driver.title, driver.current_url)
    driver.save_screenshot(str(ROOT / "result.png"))
except Exception:
    logging.exception("Selenium run failed")
    raise
finally:
    if driver:
        driver.quit()

Use the full interpreter path in Task Scheduler, for example C:Python312python.exe, and pass C:seleniumjobrun.py. If you manage the driver yourself, configure Selenium’s Service object with an explicit driver path instead of relying on PATH.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selenium Manager: convenient, not magic

Selenium Manager is the official driver manager of the Selenium project and has shipped with Selenium releases since 4.6. When a binding has not been given a driver, it can discover the installed browser, resolve a compatible driver, download it and cache it. This removes routine manual driver placement.

Automatic setup still has prerequisites. Selenium Manager may need access to remote browser and driver metadata or download endpoints. Proxies and firewalls can block it. On Windows, automatic Edge installation requires administrator permissions. In restricted servers, preinstall the browser and a vetted driver, permit approved egress, or provide an explicit Service path; record which choice you made so scheduled runs are reproducible.

Why a manual run works but the task fails

Different identity or profile

Log the account and test file permissions under that account. Do not assume your interactive profile, certificates, extensions or cached credentials are available.

Mapped drives and relative paths

Replace drive letters with UNC paths and replace relative paths with absolute ones. Set the task’s Start in directory and create output directories before launching the browser.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Hewlett Packard Enterprise ProLiant MicroServer Gen11 Tower Server, Intel Pentium Gold G7400 Processor, 16GB Memory, 1TB HDD Storage, External 180W US Power Supply (HPE Smart Choice P74439-005)
  • MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
  • READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
  • WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
  • INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
  • EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance

Invisible prompts or desktop dependencies

Install browsers and dependencies ahead of time. Avoid workflows that require a visible window, a consent dialog handled by a human, or an OS credential prompt. Prefer supported headless browser options and explicit timeouts.

Driver, browser or network mismatch

Capture Selenium Manager diagnostics and browser versions in the log. Check outbound access, proxy variables and certificate inspection. If automatic resolution is blocked, pin and update the driver through your normal server-change process.

Profile and concurrency collisions

Two sessions must not share a live browser profile. Give each run a separate temporary or dedicated profile and clean it up after completion. Prevent overlapping task instances unless the test is designed for concurrency.

Scheduled task troubleshooting

Symptom Likely cause Fix
Task shows running but no result Browser or script is waiting for an interactive prompt Use headless-compatible steps, add timeouts, and inspect the task account’s logs.
Python or test runner not found PATH differs in the scheduled context Use the absolute runtime path and set Start in.
Access denied writing output Account lacks directory permission Grant only required NTFS rights and log to a dedicated folder.
Driver resolution fails Blocked endpoint, proxy or incompatible browser Allow approved egress or install and reference a controlled driver explicitly.
Edge installation fails Automatic installation requires administrator rights Preinstall Edge or run the approved installation under an administrator account.
Remote session cannot start Client points to the wrong Grid URL or Grid components are down Verify the endpoint, Hub/Node or standalone process, and connectivity.

Selenium specifically says using IEDriverServer.exe as part of a Windows Service is unsupported and untested. A Task Scheduler process is not automatically a Windows Service; keep this warning limited to an actual service deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
  • This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
  • Dell Optiplex 3050 SFF Desktop computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD
  • Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.
  • Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
  • Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to use Selenium Grid instead

A local scheduled task is appropriate for one repeatable workflow on one server. Selenium Grid’s standalone mode is a single-machine deployment. A Hub/Node or larger Grid lets clients route sessions to multiple machines and cover different browser and operating-system combinations.

Option Best fit Trade-offs
Local scheduled task One browser environment and modest concurrency Simple control, but you maintain the server, browser and driver.
Self-hosted Grid Parallel runs or several browser/OS environments More machines and Grid operations; the client must use the correct remote endpoint.
Hosted browser testing You need capacity without operating browser infrastructure Provider dependency, network/security review, credentials and data-handling requirements.

Choose based on execution control, environment coverage, concurrency, operational effort and whether hosted execution is permitted by your security policy.

Or skip the browser setup

If your requirement is a clean page image rather than an interactive Selenium workflow, ScreenshotNeo provides a single GET request and an MCP server for AI agents. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed; response headers identify the page verdict and billing result.

cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo documentation for capture options. Its MCP tools—take_screenshot, get_page_info and capture_pdf—work with Claude, Cursor and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can Selenium run when nobody is logged in?

Yes, if the workflow is designed for a non-interactive session and the task account has every required permission. Test the exact unattended logon mode; a visible desktop is not guaranteed.

Is a scheduled task the same as a Windows Service?

No. Selenium’s unsupported-and-untested warning concerns IEDriverServer.exe used as part of a Windows Service, not every Task Scheduler job.

Should I use Selenium Manager in production?

It can simplify driver discovery, but production still needs a policy for browser versions, outbound access, proxies, permissions and fallback driver management.

Quick Recap

Bestseller No. 1
Dell PowerEdge T340 Tower Server, Windows 2019 STD OS, Intel Xeon E-2124 Quad-Core 3.3GHz 8MB, 32GB DDR4 RAM, 8TB Storage, RAID, Single PSU (Renewed)
Dell PowerEdge T340 Tower Server, Windows 2019 STD OS, Intel Xeon E-2124 Quad-Core 3.3GHz 8MB, 32GB DDR4 RAM, 8TB Storage, RAID, Single PSU (Renewed)
3.5 Inch Hot Plug Hard Drive PowerEdge T340 Tower Server Chassis; Microsoft Windows Server 2019 Standard Operating System
$2,007.46
Bestseller No. 4
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.; Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
$169.98

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.