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

Step 1: Create a Batch File to Open the URL

  1. Open Notepad.

  2. Paste the following code:

    @echo off
    start "" "https://example.com"
  3. Save the file as open_url.bat in a secure location like C:\Scripts.


Step 2: Schedule It with Task Scheduler

  1. Press Win + R, type taskschd.msc, and press Enter.

  2. Click Create Basic Task.

  3. Give the task a name (e.g., OpenURLDaily) and description.

  4. Set the trigger to Daily, and choose 2:00 AM as the start time.

  5. For the action, select Start a program.

  6. Browse and select open_url.bat.

  7. 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

  1. Open Notepad.

  2. Paste the following:

    Start-Process "https://example.com"
  3. Save the file as open_url.ps1 in C:\Scripts.


Step 2: Schedule It with Task Scheduler

  1. Open Task Scheduler (taskschd.msc).

  2. Click Create Basic Task.

  3. Name the task and set the trigger to run daily at 2:00 AM.

  4. In the Action step, choose Start a program.

  5. Set the Program/script to:

    powershell.exe
  6. 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


REFERENCES

Last updated

Was this helpful?