How to Open a URL Daily at 2 AM Using Task Scheduler
In many server administration or automation use cases, you may want to open a specific URL every day at a scheduled time—for instance, triggering a web-based report, monitoring system, or internal dashboard. This guide walks you through two simple methods to set this up on Windows Server using Task Scheduler:
Method 1: Using a .bat
(Batch) File
.bat
(Batch) FileStep 1: Create a Batch File to Open the URL
Open Notepad.
Paste the following code:
@echo off start "" "https://example.com"
Save the file as
open_url.bat
in a secure location likeC:\Scripts
.
This command uses start
to launch the URL with the default browser. The ""
prevents Windows from treating the URL as a window title.
Step 2: Schedule It with Task Scheduler
Press
Win + R
, typetaskschd.msc
, and press Enter.Click Create Basic Task.
Give the task a name (e.g.,
OpenURLDaily
) and description.Set the trigger to Daily, and choose 2:00 AM as the start time.
For the action, select Start a program.
Browse and select
open_url.bat
.Finish the wizard.
Optional: Advanced Settings
If using “Create Task” instead of Basic:
Check “Run whether user is logged on or not”
Check “Run with highest privileges”
Adjust Conditions to ensure it runs even if on battery or idle.
Method 2: Using a PowerShell Script
Step 1: Create a PowerShell Script
Open Notepad.
Paste the following:
Start-Process "https://example.com"
Save the file as
open_url.ps1
inC:\Scripts
.
Step 2: Schedule It with Task Scheduler
Open Task Scheduler (
taskschd.msc
).Click Create Basic Task.
Name the task and set the trigger to run daily at 2:00 AM.
In the Action step, choose Start a program.
Set the Program/script to:
powershell.exe
Set Add arguments (optional) to:
-ExecutionPolicy Bypass -File "C:\Scripts\open_url.ps1"
Optional: Advanced Settings
Use "Create Task" for more control.
Choose “Run with highest privileges” and “Run whether user is logged on or not.”
Final Notes
Both methods launch the URL using the default browser set on the system.
Use PowerShell if you need more advanced control or want to expand the script in the future.
Always test the script manually before scheduling to ensure it behaves as expected.
REFERENCES
Last updated
Was this helpful?