Cnvu

NSFW

You can build the whole thing in Task Scheduler + PowerShell by creating one scheduled task that:

wakes the PC at 4:20 AM

immediately runs your alarm script

launches a full-screen flashing white/blue window

Here’s the clean way to set it up.

🧩 Step 1: Create the alarm script (PowerShell)

Save this file as:

C:\Alarm\flash-alarm.ps1

🔵⚪ Flashing white/blue full-screen alarm

Add-Type -AssemblyName System.Windows.Forms

Add-Type -AssemblyName System.Drawing

$form = New-Object Windows.Forms.Form

$form.WindowState = 'Maximized'

$form.FormBorderStyle = 'None'

$form.TopMost = $true

$form.BackColor = [System.Drawing.Color]::White

$form.KeyPreview = $true

# Allow exit with any key or mouse click

$form.Add_KeyDown({ $form.Close() })

$form.Add_MouseClick({ $form.Close() })

$form.Add_Shown({ $form.Activate() })

# Colors to flash

$colors = @(

[System.Drawing.Color]::White,

[System.Drawing.Color]::Blue

)

$i = 0

$timer = New-Object Windows.Forms.Timer

$timer.Interval = 400 # flash speed (lower = faster)

$timer.Add_Tick({

$form.BackColor = $colors[$script:i % 2]

$script:i++

})

$timer.Start()

[System.Windows.Forms.Application]::Run($form)

⏰ Step 2: Create the Task Scheduler alarm (4:20 AM wake + run script)

Open PowerShell as Administrator and run:

$action = New-ScheduledTaskAction -Execute "powershell.exe" `

-Argument "-ExecutionPolicy Bypass -File C:\Alarm\flash-alarm.ps1"

$trigger = New-ScheduledTaskTrigger -Once -At "07/04/2026 4:20 AM"

$settings = New-ScheduledTaskSettingsSet -WakeToRun

Register-ScheduledTask `

-TaskName "WakeFlashAlarm420" `

-Action $action `

-Trigger $trigger `

-Settings $settings `

-Description "Wake PC and run flashing alarm at 4:20 AM"

⚙️ Step 3: IMPORTANT settings to check

In Windows:

Power settings

Control Panel → Power Options → Advanced

Enable:

Allow wake timers → Enabled

Sleep requirement

PC must be in Sleep, NOT Shutdown

🚀 What will happen at 4:20 AM

Task Scheduler triggers wake timer

PC wakes from sleep

PowerShell launches script

Full-screen white/blue flashing screen appears instantly

You (hopefully) wake up 😄

⚠️ Reality check

This works well, but:

It won’t work if the PC is fully shut down

Some monitors take a second to wake

It’s much stronger when combined with sound (optional upgrade)

If you want, I can next upgrade this into a “can’t-ignore alarm system”:

flashing speeds up over time

loud sound auto-starts

screen locks full-screen

cannot be closed for 30 seconds

Just say 👍

Full step by step instuctipn

Here’s a full step-by-step guide from scratch to set up your PC so it wakes at 4:20 AM and shows a flashing white/blue alarm screen using Task Scheduler + PowerShell.

🧠 OVERVIEW

You are building:

⏰ A scheduled wake at 4:20 AM

💻 A PowerShell alarm script

⚡ A Task Scheduler task that runs it after wake

📁 STEP 1 — Create the folder

Press Windows key

Type: File Explorer

Go to C:\

Create a folder named:

C:\Alarm

📝 STEP 2 — Create the PowerShell alarm script

Open Notepad

Paste this code:

Add-Type -AssemblyName System.Windows.Forms

Add-Type -AssemblyName System.Drawing

$form = New-Object Windows.Forms.Form

$form.WindowState = 'Maximized'

$form.FormBorderStyle = 'None'

$form.TopMost = $true

$form.BackColor = [System.Drawing.Color]::White

$form.KeyPreview = $true

# Exit on key press or mouse click

$form.Add_KeyDown({ $form.Close() })

$form.Add_MouseClick({ $form.Close() })

$form.Add_Shown({ $form.Activate() })

# Flash colors

$colors = @(

[System.Drawing.Color]::White,

[System.Drawing.Color]::Blue

)

$i = 0

$timer = New-Object Windows.Forms.Timer

$timer.Interval = 400

$timer.Add_Tick({

$form.BackColor = $colors[$script:i % 2]

$script:i++

})

$timer.Start()

[System.Windows.Forms.Application]::Run($form)

Click File → Save As

Save as:

C:\Alarm\flash-alarm.ps1

IMPORTANT:

Save as All Files

NOT .txt

⚙️ STEP 3 — Enable wake timers (VERY IMPORTANT)

Open Control Panel

Go to:

Power Options

Next to your plan → click Change plan settings

Click Change advanced power settings

Expand:

Sleep → Allow wake timers

Set to:

Enable

💤 STEP 4 — Put PC in Sleep (test requirement)

Before relying on it:

Your PC must use Sleep mode (not Shutdown)

⏰ STEP 5 — Create the 4:20 AM wake + alarm task

Press Start

Type:

PowerShell

Right-click → Run as Administrator

Now paste this:

$action = New-ScheduledTaskAction -Execute "powershell.exe" `

-Argument "-ExecutionPolicy Bypass -File C:\Alarm\flash-alarm.ps1"

$trigger = New-ScheduledTaskTrigger -Once -At "07/04/2026 4:20 AM"

$settings = New-ScheduledTaskSettingsSet -WakeToRun

Register-ScheduledTask `

-TaskName "WakeFlashAlarm420" `

-Action $action `

-Trigger $trigger `

-Settings $settings `

-Description "Wake PC and run flashing alarm at 4:20 AM"

🔍 STEP 6 — Verify it worked

Open Task Scheduler

Go to:

Task Scheduler Library

Find:

WakeFlashAlarm420

Check:

Trigger = 4:20 AM

“Wake the computer to run this task” enabled (WakeToRun)

🌙 STEP 7 — Before you sleep

Do this checklist:

✔ Save everything

✔ Put PC into Sleep (NOT shutdown)

✔ Make sure monitor is plugged in

✔ Ensure volume is not muted (optional if adding sound later)

🚀 WHAT WILL HAPPEN AT 4:20 AM

PC wakes from sleep

Windows triggers scheduled task

PowerShell launches script

Full-screen flashing white ↔ blue screen appears

You wake up

⚠️ IMPORTANT LIMITATIONS

❌ Will NOT work if PC is fully shut down

⚠️ Some monitors wake slightly delayed

⚠️ No sound included (screen-only alarm)

💡 OPTIONAL UPGRADE (if you want later)

I can improve this into a much stronger alarm system:

loud sound on wake 🔊

flashing gets faster over time

impossible-to-ignore full-screen lock

auto brightness max

Just tell me 👍

Posted Jul 3, 2026, 6:12 PM UTC

10
Loading comments…