DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Selenium

How to Run Selenium as a Scheduled Task on Windows Server

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

Use Windows Task Scheduler to start your Selenium runtime under the same account and logon mode you will use in production. Give the task explicit paths to the script, browser, driver strategy, configuration, and output directory. Then test it with Run whether user is logged on or not if that is how it will run unattended. A browser session that works in a logged-in desktop can fail in the non-interactive scheduled context because it expects a desktop, mapped drive, profile data, or a prompt.

This guide covers a local scheduled run, Selenium Manager, diagnostics, and the point at which Selenium Grid or hosted browser execution is more appropriate.

What a scheduled Selenium run changes

Task Scheduler does not reproduce your interactive login automatically. The task has an identity, a logon mode, an environment, a working directory, permissions, and a session in which the browser must start.

  • Run only when user is logged on: the process can use that user’s interactive desktop. This is useful for diagnosing desktop-dependent workflows, but it is not unattended execution.
  • Run whether user is logged on or not: the process is non-interactive. Do not expect a visible browser window, desktop prompts, mapped drive letters, or user-only profile state to be available.

Use the production mode during testing. A successful manual run proves only that the browser works for that user in that session.

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

Prepare the run before creating the task

Record every dependency

Write down the absolute path of the script or test runner, language runtime, Selenium version, browser and browser version, driver method, configuration files, environment variables, and log/result locations. This list gives you a baseline when the scheduled run differs from the manual run.

Choose an account deliberately

Select an account that can read the script and configuration, launch the browser, access required network resources, and write logs and screenshots. Grant only the permissions the workload needs. Test those permissions while signed in as the task account or by writing a small diagnostic file from the task itself.

Replace fragile paths

Use absolute local paths such as C:Automationrun.py and C:Automationlogs. A mapped drive such as Z: may not exist in an unattended task; use a UNC path and verify that the task account is authorized instead. Set the task’s Start in directory explicitly so relative imports, fixtures, and output paths resolve consistently.

Create the scheduled task

  1. Open Task Scheduler on Windows Server and choose Create Task, rather than relying on a task created by a different interactive account.
  2. On General, enter a descriptive name, select the intended user or service account, and choose either Run only when user is logged on or Run whether user is logged on or not. Enable elevated privileges only when the browser workflow genuinely requires them.
  3. On Triggers, create the schedule (for example, daily or at startup). Add a delay if the server needs time to establish networking after boot.
  4. On Actions, choose Start a program. Launch the language runtime or test runner, not a shortcut that depends on a user’s shell. Put the script and arguments in the appropriate fields and set Start in to the project directory.
  5. On Conditions, review power, idle, and network requirements. A server task can be prevented from starting by conditions intended for desktop computers.
  6. On Settings, enable a useful timeout, define what happens if a run is already active, and configure retry behavior appropriate to your test. Do not allow overlapping runs to corrupt the same profile or output directory.
  7. Save the task, enter the account password if Windows requests it, and use Run to test it. Inspect History, Last Run Result, and the output files.

Launch examples for common Selenium runtimes

Python

For a virtual environment, point the action directly at its interpreter. Example action values:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Program: C:Automation.venvScriptspython.exe
  • Arguments: C:Automationrun_selenium.py --config C:Automationconfig.json
  • Start in: C:Automation

A minimal diagnostic script can record identity and progress before opening the browser:

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

log_dir = pathlib.Path(r"C:Automationlogs")
log_dir.mkdir(parents=True, exist_ok=True)
logging.basicConfig(filename=log_dir / "run.log", level=logging.INFO)
logging.info("started as %s", getpass.getuser())

options = Options()
options.add_argument("--headless=new")
driver = webdriver.Chrome(options=options)
try:
    driver.get("https://example.com")
    logging.info("title=%s", driver.title)
finally:
    driver.quit()

Headless mode avoids a dependency on a visible desktop, but it does not fix missing permissions, blocked network access, or a browser that cannot start under the task account.

PowerShell wrapper

A wrapper is useful when you need environment setup and reliable exit codes:

$ErrorActionPreference = "Stop"
Set-Location "C:Automation"
& "C:Automation.venvScriptspython.exe" "C:Automationrun_selenium.py" --config "C:Automationconfig.json"
exit $LASTEXITCODE

Use the wrapper as the Task Scheduler program and set its execution policy and arguments according to your server policy. Write standard output and errors to a file or to your logging system; Task Scheduler’s result code alone rarely identifies a browser failure.

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.

Driver and browser management

Selenium requires a language binding, a browser, and a compatible driver relationship. Selenium Manager is the official driver manager of the Selenium project and has been shipped with Selenium releases since 4.6. When your binding has not been given a driver, it can discover the installed browser, resolve a matching driver, download it, and cache it.

When Selenium Manager is convenient

  • The server can reach the remote metadata and download endpoints used to discover and obtain drivers.
  • The task account can write to Selenium Manager’s cache location.
  • The installed browser is the browser you intend to automate.

When to manage the driver yourself

Use a controlled driver installation and an explicit Selenium Service path when outbound access is prohibited, downloads must be approved, or you need a repeatable image. Record the browser and driver versions as part of deployment. Proxies and firewalls can prevent Selenium Manager from discovering versions or downloading files. On Windows, Selenium Manager’s automatic Edge installation requires administrator permissions.

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

Do not confuse driver management with browser installation policy. Selenium Manager can reduce setup work, but it does not bypass your organization’s network, proxy, cache, or privilege controls.

Make unattended browser behavior explicit

Profiles and concurrent runs

A browser profile may be locked or unavailable when no user is logged on. Prefer a dedicated automation profile or a temporary profile per run, and never let simultaneous tasks share the same profile directory. Store downloads and screenshots in a directory writable by the task account.

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

Prompts, pop-ups, and desktop assumptions

Credential dialogs, certificate prompts, first-run browser screens, and extensions that expect a desktop can pause a non-interactive run indefinitely. Configure browser options to avoid first-run prompts, use headless mode where compatible, and add explicit timeouts. If the site itself requires an interactive challenge, treat that as a workflow limitation rather than repeatedly retrying a stuck task.

Network readiness

A task at startup may run before DNS, VPN, proxy authentication, or firewall rules are ready. Add a controlled delay or a preflight check, then fail with a clear log message. Ensure the account’s proxy and certificate configuration is available in its scheduled context.

Test the exact production context

  1. Run a preflight that logs the account name, current directory, key environment variables, browser discovery result, and write access to the output directory.
  2. Run the task manually from Task Scheduler, not from an administrator’s terminal.
  3. Repeat with the production logon mode. Compare interactive and non-interactive results.
  4. Check whether the browser process starts, whether navigation completes, and whether the script reaches its final log line.
  5. Capture driver and browser startup exceptions, HTTP timeouts, and the task’s last-run result.
  6. Only after the local task is stable, enable the recurring trigger.

Troubleshooting scheduled Selenium failures

Symptom Likely cause Fix
Task reports success but no output exists Wrong working directory, relative path, or an account that cannot write the destination Use absolute paths, set Start in, create the directory in the script, and log the identity and exit code.
Browser works manually but hangs when no user is logged in Non-interactive session lacks a desktop, profile, prompt, or visible window Use headless options where supported, remove prompt dependencies, use a dedicated profile, and test the exact unattended mode.
Selenium Manager cannot obtain a driver Proxy/firewall blocks metadata or download endpoints, or the cache is not writable Permit approved egress and cache access, or install and pin a driver and pass its explicit Service path.
Edge installation fails Automatic Edge installation is being attempted without administrator rights Install Edge through your approved software process or run the managed installation with the required administrator permission.
Only scheduled runs fail to access files The task account cannot read the script/configuration or relies on a mapped drive Grant required NTFS/share permissions and replace mapped letters with explicit local or UNC paths.
Runs overlap or corrupt results A new trigger starts before the previous browser exits Configure the task’s concurrent-run policy, use unique output paths, and always call quit() in cleanup.
Remote sessions never start Client points to the wrong Grid URL or Grid components are stopped Verify the endpoint, start the required Grid components, and test a minimal remote session before running the full suite.

IE driver and Windows Services

Selenium expressly describes using IEDriverServer.exe as part of a Windows Service as unsupported and untested. A Task Scheduler job is not automatically a Windows Service, so do not generalize that warning to every scheduled task. If your design actually installs the IE driver inside a service process, choose a supported architecture instead.

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 one server is no longer enough

Model Best fit Trade-offs
Local scheduled task One browser and operating-system setup, modest concurrency, local data requirements Simple control, but you maintain the server, browser, driver, credentials, and failures.
Selenium Grid on your machines Multiple browsers, operating systems, machines, or parallel sessions More environment coverage and capacity, with Grid Hub/Node or larger deployment operations to maintain.
Hosted browser testing Parallel or cross-platform execution without operating browser hosts Provider dependency, network and security review, credentials and data-handling requirements, and service configuration.

Selenium Grid’s standalone mode is intended for a single machine. A multi-machine Grid uses Nodes to provide additional environments and capacity. Your client must still be configured for the correct remote endpoint; moving execution to Grid does not remove that requirement.

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

Or skip the browser setup

If your job is to capture finished web pages rather than interact with them, ScreenshotNeo can replace a browser-and-driver setup with one request. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

See the ScreenshotNeo documentation for all options, including full-page lazy-image loading, CSS-selector element capture, dark mode, device presets, custom viewport and retina scale, PDF paper and page controls, HTML/CSS rendering, JavaScript and CSS injection, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and OpenAPI compatibility.

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}`);

The Free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to get started.

Frequently Asked Questions

Can a scheduled Selenium task run with no one logged in?

Yes, when configured for “Run whether user is logged on or not,” but that context is non-interactive. Workflows requiring a desktop, prompts, mapped drives, or user-only profile state must be redesigned or run in an interactive mode.

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

Should I use Selenium Manager on a locked-down server?

Use it only if approved network access and cache permissions are available. Otherwise install a controlled, compatible driver and configure Selenium with its explicit Service path.

Is Selenium Grid required for a nightly test?

No. A local scheduled task is suitable for one environment and modest concurrency. Grid becomes useful when you need multiple machines, browsers, operating systems, or parallel sessions.

Does a Task Scheduler job count as a Windows Service for Selenium’s IE warning?

No. Selenium’s unsupported and untested statement specifically concerns IEDriverServer.exe used as part of a Windows Service; it does not automatically classify every scheduled task that way.

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
$1,989.37
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.
$179.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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.