A sleek, lightweight Windows utility to schedule a Shutdown, Restart, Sleep, or Lock — exactly when you want it.
Shutdown Timer Pro is a small WPF desktop app that lets you queue up a power action Shutdown, Restart, Sleep, or Lock to run after a countdown or at a specific date and time. It's built for everyday situations: downloading a large file overnight, letting a long render finish unattended, or simply enforcing your own screen-time limit. The scheduled task survives app restarts (it's saved to the registry and the app can auto-launch on login), runs quietly from the system tray, and can optionally warn you with a desktop reminder and sound before it fires.
- Four power actions — Shutdown, Restart, Sleep, or Lock the workstation.
- Two scheduling modes
- Timer mode — countdown by hours and minutes (e.g. "in 2h 30m").
- Exact time mode — pick a specific date and clock time.
- Reminders & sound — an optional desktop notification a few minutes before the action triggers, with an optional audible alert.
- Force execution — skip the "save your work" prompts and close stubborn apps that would otherwise block the action.
- System tray integration — minimizes to the tray and keeps running quietly in the background.
- Task persistence — the scheduled task is stored in the Windows registry, so closing the app (or a reboot) doesn't cancel it; the app re-launches on login to keep the countdown alive.
- Light & dark themes — a modern, borderless window with a built-in theme toggle, including live re-coloring of the visual tree.
- Reliable power control — uses native Win32 APIs (
user32.dll,advapi32.dll) with proper shutdown-privilege elevation, falling back to the built-inshutdown.execommand if the native call doesn't succeed.
- Windows 7 SP1 or later (Windows 10/11 recommended)
- .NET Framework 4.8 (typically pre-installed on modern Windows)
- Visual Studio 2019/2022 with the .NET desktop development workload (only required to build from source)
- Clone the repository:
git clone https://github.com/xecvas/ShutdownTimer.git cd ShutdownTimer - Open
ShutdownTimer.slnin Visual Studio. - Build the solution (
Ctrl+Shift+B) or publish aReleasebuild. - Run
Shutdown Timer.exefrombin/Release(orbin/Debug).
Alternatively, download the latest pre-built executable from the Releases page and run Shutdown Timer.exe directly — no installation required.
- Select an action — Shutdown, Restart, Sleep, or Lock.
- Set the time
- Use the Timer tab for a countdown (hours and minutes), or
- Use the Exact Time tab to pick a specific date and time.
- Choose options (optional)
- Force — close apps without waiting for confirmation.
- Reminder — get a heads-up a few minutes before the action runs.
- Sound — pair the reminder with an audible beep.
- Click Start — the app drops into the system tray and waits for the scheduled time. Closing the window does not cancel the task.
- Changed your mind? Open the app from the tray icon and click Cancel Task.
Shutdown Timer/
├── Models/
│ └── Models.cs # PowerAction, AppTheme enums and ScheduleSettings
├── Utilities/
│ ├── PowerManager.cs # Win32 interop for shutdown/restart/sleep/lock + fallback
│ ├── RegistryService.cs # Task & theme persistence, auto-start registration
│ └── ThemeHelper.cs # Light/dark theme application across the visual tree
├── assets/ # Icon and image resources
├── App.xaml / App.xaml.cs # Application entry point
└── MainWindow.xaml / .xaml.cs # Main UI, scheduling logic, and tray behavior
- Framework: C# / WPF (Windows Presentation Foundation) on .NET Framework 4.8
- UI styling: Custom XAML resource dictionaries for a clean, borderless window with light/dark theming
- System integration: Native Windows API calls (
user32.dll,advapi32.dll) for power state transitions and shutdown-privilege elevation, with ashutdown.exefallback path - Persistence: Windows Registry (
HKCU) stores the pending task, theme preference, and the auto-start entry underRun
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/my-feature). - Commit your changes (
git commit -m "Add my feature"). - Push to the branch (
git push origin feature/my-feature). - Open a Pull Request.
Please keep changes consistent with the existing .NET Framework 4.8 / WPF target and avoid introducing dependencies on newer .NET runtimes.
This project is licensed under the terms found in LICENSE.txt.
Created with ❤️ by xecvas

