Code Monkey home page Code Monkey logo

shutdowntimerclassic's Introduction

Shutdown Timer Classic 🕒

Shutdown Timer Classic is a small little Windows application that allows you to set a timer that will shutdown, restart, hibernate, sleep or lock your PC.

Screenshot of the main menu

I am also planning on developing a more advanced and sleek version of this app in the future.

Want to contribute or take a look at my code? Awesome, I welcome all and any contributions and would love to hear your opinion. Take a look at my file and folder structure document to read more about how everything ties together.

Usage ✨

Shutdown Timer is a very simple application hence it is easy to use. Just choose a power action from the drop-down menu and then dial in the time span you want. If the counter reaches zero the chosen power action will be executed.

Upon reaching zero, the Shutdown Timer will (actually Windows will do this, Shutdown Timer just gives the command to) force close any still running applications to ensure the shutdown does not get interrupted. Therefore you may experience data loss if any application is in the process of saving or processing data when the shutdown begins. You can combat this by selecting a longer timespan to ensure the running applications has enough headroom to complete its operation or by choosing the Sleep or Hibernate power actions.

If you are certain that all applications will exit properly and will not require any human interaction (like a word processor which would open a save dialog when being told to exit), you can choose a graceful shutdown which will just execute a regular shutdown as if you were to manually shutdown Windows yourself. This means that all applications will have enough time to exit and nothing is forced to exit (which also means that applications can interrupt the shutdown). Thus you should be careful to use this mode as it might result in a failed shutdown. The graceful mode applies to all power actions which force close apps and is not exclusive to a shutdown.

By default, the countdown window will be always on top of every other window so you don't forget that you have an active shutdown timer. The countdown can also be hidden by selecting the "Run in background" checkbox under the dropdown menu. If the countdown is already running you can just right click anywhere in the countdown window to bring up a menu with the option to minimize the countdown to the background. It can also be brought back from the background by using the tray menu (described below).

Screenshot of the main menu with extended combobox

Screenshot of the settings window Screenshot of the right click menu

Colors 🎨

The countdown window has 4 different background colors to visualize the time left and one animation to draw your attention when the time is about to run out, in case you forget about the shutdown timer. Here is a quick overview:

Time left Color Animated
> 30 min. Green No
30 - 10 min. Yellow No
10 - 1 min. Orange No
< 1min. Red / Black Yes

Screenshot of countdown window with green background Screenshot of countdown window with yellow background Screenshot of countdown window with orange background Screenshot of countdown window with red background Screenshot of countdown window with black background

Tray Menu 🔧

Shutdown Timer also includes a tray menu to control the application from you Taskbar tray. Just right click the icon to bring it up (you may need to click on the little arrow on the right of your Taskbar to find the Shutdown Timer icon). You can stop, restart and view the timer from it and also switch the UI mode to hide or show the countdown window.

Screenshot of the tray menu

The same menu can also be accessed by right clicking in the countdown window.

CLI 💻

You can also use the command line to start the Shutdown Timer with specific arguments and settings. In PowerShell or CMD navigate to the folder where the executable is located.

Then type .\ShutdownTimerClassic.exe and add the arguments you want after this:

Argument                 Description

/SetTime <time>          Sets the time for the countdown. Either type in the seconds, use HH:mm:ss or HH:mm.

/SetAction <action>      Sets the power action which will be executed after the countdown reached zero.
                         Type in the exact name as seen in the UI (eg: Shutdown, Restart or Sleep. Do not use shutdown Reboot or SLEEP)

/SetMode <mode>          Sets the control mode. Modes available:
                         Prefill:       Prefills settings but let user manually change them too. Timer won't start automatically.
                         Lock:          Overrides settings so the user can not change them. Timer won't start automatically.
                         Launch:        Overrides settings and starts the timer.
                         ForcedLaunch:  Overrides settings and starts the timer. Disables all UI controls and exit dialogs.

/Graceful                Will use the graceful mode if available. This means that your computer will do a normal, interruptible, shutdown.
                         Your shutdown might fail when apps resist the close event. Only use this if you know what you are doing.

/AllowSleep              Allows your computer to go to sleep while the countdown is active.

/Background              Runs the countdown in the background.
                         This is not a silent mode, the user will still get notifications and can use the tray menu.

/NoSettings              Uses temporary ephemeral settings and ignores the `settings.json` file.

Example: .\ShutdownTimerClassic.exe /SetTime 01:00 /SetAction Hibernate /SetMode Launch This command will launch launch Shutdown Timer in hibernation mode with 1 hours, 0 minutes and 0 seconds and start the countdown.

If you want to redistribute my executable with your own app/script you are free to do so. Please just keep it updated and mention this project somewhere in the description (ie: follow the license for this project).

Behavior 📄

Shutdown sequence

When a shutdown is executed all windows will be closed, regardless if they resist or not so any unsaved work will be gone! This is done to be sure your PC shuts down and can not be stopped by another process.

If you wish to have a normal shutdown you may enable the graceful mode. This will not force close any apps, but might lead to a failed shutdown as any apps which do not exit upon request can pause the shutdown. Apps might not close because they are unresponsive, require user interactions, or are still working.

Please note that I am not liable for any data loss because you didn't save that extremely important document and now it's gone. That is your fault!

Canceling the shutdown

As long as the timer has not reached zero, you can cancel the countdown at any time by simply pressing the close button (that big X in the top right corner). A dialog will then pop up asking you if you want to cancel. If you choose so, the countdown will be immediately canceled and another message will tell you that the countdown was successfully canceled and that the application will close after clicking OK. At this point, the countdown has already stopped and you have all the time you want before clicking ok, which results in the application closing itself.

If you are running it in the background, then you can go to the notification area (click on the arrow on the right side of your taskbar) and right-click on the application icon. This will bring up a menu with the option "Stop and exit". Clicking this will cancel the shutdown and tell you about the cancellation using a message box.

Logging and Privacy

The application is not connected to the internet and does not collect usage data. If there is an internal exception it will save a stack trace and simple event log to the users desktop (since v1.2.0) and notify the user but it will not automatically share any data with anyone. If you are using the Microsoft Store release, then the Store will also monitor basic usage and crashes and (depending on your Windows privacy settings) share this data with Microsoft and me.

shutdowntimerclassic's People

Contributors

lukaslangrock avatar matheusoliveira-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shutdowntimerclassic's Issues

Shutdown Timer

---- Process Info ----
PID: 7944
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 03/22/2023 19:37:10
PeakWorkingSet64: 20.2MB (21176320byte)
WorkingSet64: 20.2MB (21172224byte)
PeakWorkingSet64: 20.2MB (21176320byte)
PrivateMemorySize64: 23.5MB (24608768byte)
VirtualMemorySize64: 198.4MB (208023552byte)
PeakVirtualMemorySize64: 198.4MB (208023552byte)
PagedSystemMemorySize64: 318.9KB (326536byte)
NonpagedSystemMemorySize64: 19.7KB (20152byte)
PagedMemorySize64: 23.5MB (24608768byte)
PeakPagedMemorySize64: 23.5MB (24608768byte)
UserProcessorTime: 00:00:00.1093750
TotalProcessorTime: 00:00:00.2500000
PrivilegedProcessorTime: 00:00:00.1406250

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: en-US
Executable Path: C:\ShutdownTimerClassic_v1.2.3.zip-fox-01-23-2023\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19045.0
Runtime Version: 4.0.30319.42000
System Uptime: 4965703
Machine Name: ADMN-W10-PRO-64
Processor Count: 4
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Object reference not set to an instance of an object.
Stack Trace:
at ShutdownTimer.Helpers.SettingsProvider.CheckSettings() in C:\Users\Lukas\repos\ShutdownTimerClassic\src\ShutdownTimer\Helpers\Settings.cs:line 62
at ShutdownTimer.Helpers.SettingsProvider.Load() in C:\Users\Lukas\repos\ShutdownTimerClassic\src\ShutdownTimer\Helpers\Settings.cs:line 46
at ShutdownTimer.Program.Main(String[] args) in C:\Users\Lukas\repos\ShutdownTimerClassic\src\ShutdownTimer\Program.cs:line 26

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

Feature request: disable confirmation dialogs

If a timer is running and I close the app don't ask me first to confirm and then follow it with another dialog telling me it was cancelled. Just close gracefully.

Happy if this is an option of course!

feature request: require password to stop, restart, or change timer once started

I want to start Shutdown Timer and then prevent it from being changed/exited/stopped/restarted without a password. I realize the user could simply kill it in task manager, but I'm predicating this request on the fact that many children don't know (yet) know how to do that. The password could be stored in-memory -- no need to write it to disk and that would eliminate the need for encryption (i dont think you need to encrypt the password in-memory).

A text input field above the start button: Password: would suffice. Clicking one of the tray menu items, changing any inputs, stopping the timer, exiting the timer -- would all require the password to be typed.

Graceful Shutdown

It would be nice to have ability to do graceful shutdown, so apps can save the data if they can do that. Also I have a question, will running app prevent a computer from going to sleep?

Roadmap for v1.3

This issue outlines which (non-trivial) features/fixes/changes have been selected or are considered for future versions of the application.

Known issues in 1.2.3

  • Crashing at start (#30)
    Not enough data to pinpoint the exact source of the issue, but it seems like not many people are affected.

Version 1.3.0

  • Fix for known issue #30
  • Select a time of day for countdown (#11)
  • Transparent countdown window (part of #16)
  • Pause/resume countdown (part of #16)
  • Update remaining time while active (part of #16)
  • Custom action (command) instead of power actions (part of #18)
  • Ability for timer reset on mouse movement (part of #18)
  • Option to disable confirmation dialogues (#33)
  • Disallow multiple instances by default (but configurable in settings) (#27)

Version 1.3.1 - The "Custom" Update

  • Custom buttons for adding more time to the countdown (#16 and #17)
  • Custom events during countdown (part of #16 and #17)
  • Custom Hotkey support (#16)
  • Customizable notification messages (#41)

Features under consideration

  • Scheduling shutdowns (#8 and #9)

Crashing on startup (even after reinstall)

---- Process Info ----
PID: 128856
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 05/03/2023 02:35:46
PeakWorkingSet64: 21,1MB (22102016byte)
WorkingSet64: 21,1MB (22097920byte)
PeakWorkingSet64: 21,1MB (22102016byte)
PrivateMemorySize64: 15,7MB (16416768byte)
VirtualMemorySize64: 204,4MB (214355968byte)
PeakVirtualMemorySize64: 204,7MB (214683648byte)
PagedSystemMemorySize64: 310,7KB (318184byte)
NonpagedSystemMemorySize64: 19,5KB (20016byte)
PagedMemorySize64: 15,7MB (16416768byte)
PeakPagedMemorySize64: 15,7MB (16416768byte)
UserProcessorTime: 00:00:00.1718750
TotalProcessorTime: 00:00:00.2656250
PrivilegedProcessorTime: 00:00:00.0937500

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: en-ID
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19044.0
Runtime Version: 4.0.30319.42000
System Uptime: 78664843
Processor Count: 8
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Object reference not set to an instance of an object.
Stack Trace:
at ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
at ShutdownTimer.Helpers.SettingsProvider.Load()
at ShutdownTimer.Program.Main(String[] args)

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

Where are the executables?

Hello there!

I’m not afraid to seem like a little dummy boy, but, how can I start the app actually ?

application crashed

[email protected] experienced a critical exception.
The following data includes information about your system, the exception and the internal state of the application at the time of the exception. You may remove certain information (like your username which may be included in the log) to protect your privacy.
Please open an issue on https://github.com/lukaslangrock/ShutdownTimerClassic and include the contents of this log file to help identify and fix the issue.

---- Process Info ----
PID: 9064
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 2023. 05. 17. 0:40:17
PeakWorkingSet64: 22,4MB (23457792byte)
WorkingSet64: 22,4MB (23453696byte)
PeakWorkingSet64: 22,4MB (23457792byte)
PrivateMemorySize64: 13,6MB (14282752byte)
VirtualMemorySize64: 191,6MB (200876032byte)
PeakVirtualMemorySize64: 192,6MB (201940992byte)
PagedSystemMemorySize64: 291,4KB (298368byte)
NonpagedSystemMemorySize64: 20,5KB (20968byte)
PagedMemorySize64: 13,6MB (14282752byte)
PeakPagedMemorySize64: 13,6MB (14282752byte)
UserProcessorTime: 00:00:00.0625000
TotalProcessorTime: 00:00:00.1093750
PrivilegedProcessorTime: 00:00:00.0468750

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: hu-HU
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19044.0
Runtime Version: 4.0.30319.42000
System Uptime: 6451156
Machine Name: DESKTOP-ZOLI
Processor Count: 16
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Az objektumhivatkozás nincs beállítva semmilyen objektumpéldányra.
Stack Trace:
a következő helyen: ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
a következő helyen: ShutdownTimer.Helpers.SettingsProvider.Load()
a következő helyen: ShutdownTimer.Program.Main(String[] args)

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

Critical Crash after starting App with crack sounding via Soundsystem

[email protected] experienced a critical exception.
The following data includes information about your system, the exception and the internal state of the application at the time of the exception. You may remove certain information (like your username which may be included in the log) to protect your privacy.
Please open an issue on https://github.com/lukaslangrock/ShutdownTimerClassic and include the contents of this log file to help identify and fix the issue.

---- Process Info ----
PID: 1200
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 19.01.2024 00:59:57
PeakWorkingSet64: 22,4MB (23470080byte)
WorkingSet64: 22,4MB (23465984byte)
PeakWorkingSet64: 22,4MB (23470080byte)
PrivateMemorySize64: 13,5MB (14204928byte)
VirtualMemorySize64: 191,6MB (200921088byte)
PeakVirtualMemorySize64: 192,6MB (201986048byte)
PagedSystemMemorySize64: 290,8KB (297776byte)
NonpagedSystemMemorySize64: 20,7KB (21240byte)
PagedMemorySize64: 13,5MB (14204928byte)
PeakPagedMemorySize64: 13,5MB (14204928byte)
UserProcessorTime: 00:00:00.0937500
TotalProcessorTime: 00:00:00.2812500
PrivilegedProcessorTime: 00:00:00.1875000

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: de-DE
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19045.0
Runtime Version: 4.0.30319.42000
System Uptime: 119515
Machine Name: SYDOW
Processor Count: 8
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Stack Trace:
bei ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
bei ShutdownTimer.Helpers.SettingsProvider.Load()
bei ShutdownTimer.Program.Main(String[] args)

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

App crashing

Hi! Getting error mesage whet start app. It's make me sad :(

Error:

---- Process Info ----
PID: 6052
ProcessName: ShutdownTimerClassic
Arguments: 
PriorityClass: Normal
Threads: 6
Responding: True
HasExited: False
StartTime: 25.07.2022 23:00:18
PeakWorkingSet64: 16,9MB (17731584byte)
WorkingSet64: 16,9MB (17727488byte)
PeakWorkingSet64: 16,9MB (17731584byte)
PrivateMemorySize64: 9MB (9457664byte)
VirtualMemorySize64: 159,7MB (167481344byte)
PeakVirtualMemorySize64: 163,7MB (171606016byte)
PagedSystemMemorySize64: 228,9KB (234424byte)
NonpagedSystemMemorySize64: 17,2KB (17568byte)
PagedMemorySize64: 9MB (9457664byte)
PeakPagedMemorySize64: 9MB (9457664byte)
UserProcessorTime: 00:00:00.0937500
TotalProcessorTime: 00:00:00.1875000
PrivilegedProcessorTime: 00:00:00.0937500


---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: ru-UA
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20


---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19044.0
Runtime Version: 4.0.30319.42000
System Uptime: 48740937
Machine Name: DESKTOP-B173R9C
Processor Count: 4
Shutdown Started: False


---- Exception ----
Type: UnhandledException
Message: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. Access is denied.
Stack Trace:
    at ShutdownTimer.Helpers.SettingsProvider.Load()
   at ShutdownTimer.Program.Main(String[] args)


---- Internal Event Log ----
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

Error?

[email protected] experienced a critical exception.
The following data includes information about your system, the exception and the internal state of the application at the time of the exception.
Please open an issue on https://github.com/LukasLangrock/ShutdownTimerClassic and include the contents this log file to help identify and fix the issue.

---- Process Info ----
PID: 4212
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 10
Responding: True
HasExited: False
StartTime: 13/01/2021 23.12.22
PrivateMemorySize64: 18345984
VirtualMemorySize64 309768192
PagedMemorySize64 18345984
PeakWorkingSet64: 33132544
WorkingSet64: 33128448
UserProcessorTime: 00:00:00.1093750
TotalProcessorTime: 00:00:00.2656250
ProcessorAffinity: 4095

---- Application Info ----
You may remove information from here to protect your privacy.
Product Name: ShutdownTimerClassic
Product Version: 1.2.0.0
Current Culture: id-ID
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.0.0_neutral__jnfph5tq58r4j\Shutdown Timer\ShutdownTimerClassic.exe

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19042.0
Runtime Version: 4.0.30319.42000
System Uptime: 832812875
Machine Name: XYZ
Processor Count: 12
Shutdown Started: False

---- Exception ----
Message: Object reference not set to an instance of an object.
Stack Trace:
at ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
at ShutdownTimer.Helpers.SettingsProvider.Load()
at ShutdownTimer.Menu.LoadSettings()
at ShutdownTimer.Menu.Menu_Shown(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnShown(EventArgs e)
at System.Windows.Forms.Form.CallShownEvent()
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Menu] Load settings
[Menu] Load menu

---- End of Log ----

Disable multiple instances

Hi,
thanks for this awesome app!

I'd just like to suggest that you add an option to allow only one instance of the application.

Trouble with Command line

This looks great when I run it from the UI but when I try running from CMD, even as Admin, I get
Access is denied.

I've changed directories and run
Shutdowntimerclassic.exe with and without any arguments and result is always the same

This is where it resides:
(C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.2.0_x64__jnfph5tq58r4j\ShutdownTimer)

Any ideas?

Optimize countdown resizing

Requested via Email

The clock text in the countdown window does not change it's size when resizing the window.

Crashing after a ~week of usage

After about a week of usage app starts to crash. Windows restart does not help.
Only full reinstall of app helps.

Happens very consistently on my side. Already reinstalled about 3 or 4 times because of that.

[email protected] experienced a critical exception.
The following data includes information about your system, the exception and the internal state of the application at the time of the exception. You may remove certain information (like your username which may be included in the log) to protect your privacy.
Please open an issue on https://github.com/lukaslangrock/ShutdownTimerClassic and include the contents of this log file to help identify and fix the issue.


---- Process Info ----
PID: 16392
ProcessName: ShutdownTimerClassic
Arguments: 
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 02.06.2023 22:44:41
PeakWorkingSet64: 21,4MB (22478848byte)
WorkingSet64: 21,4MB (22478848byte)
PeakWorkingSet64: 21,4MB (22478848byte)
PrivateMemorySize64: 67,9MB (71176192byte)
VirtualMemorySize64: 268,7MB (281731072byte)
PeakVirtualMemorySize64: 269MB (282058752byte)
PagedSystemMemorySize64: 443,6KB (454288byte)
NonpagedSystemMemorySize64: 21KB (21512byte)
PagedMemorySize64: 67,9MB (71176192byte)
PeakPagedMemorySize64: 67,9MB (71176192byte)
UserProcessorTime: 00:00:00.0156250
TotalProcessorTime: 00:00:00.0156250
PrivilegedProcessorTime: 00:00:00


---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: ru-KZ
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20


---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.22621.0
Runtime Version: 4.0.30319.42000
System Uptime: 57934031
Machine Name: BUSTEDBUNNY-PC
Processor Count: 16
Shutdown Started: False


---- Exception ----
Type: UnhandledException
Message: Object reference not set to an instance of an object.
Stack Trace:
    at ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
   at ShutdownTimer.Helpers.SettingsProvider.Load()
   at ShutdownTimer.Program.Main(String[] args)


---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs


---- End of Log ----

Timer can't count down from 24 or more hours

It seems like the there is an automatic conversion from hours into days so >=24h will result in the hours going back to zero and a day getting incremented (which won't affect the countdown as it only uses hours, minutes, and seconds, not days).

This is probably because I only request hours, minutes, and seconds from the TimeSpan difference between countdown start and the countdown target.

startup crash on msi katana (laptop)

works fine on my desktop, crashes on my laptop.

---- Process Info ----
PID: 6076
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 4/4/2024 9:01:49 AM
PeakWorkingSet64: 23.9MB (25030656byte)
WorkingSet64: 23.9MB (25030656byte)
PeakWorkingSet64: 23.9MB (25030656byte)
PrivateMemorySize64: 13.8MB (14438400byte)
VirtualMemorySize64: 198.1MB (207769600byte)
PeakVirtualMemorySize64: 198.5MB (208097280byte)
PagedSystemMemorySize64: 300.9KB (308160byte)
NonpagedSystemMemorySize64: 23KB (23552byte)
PagedMemorySize64: 13.8MB (14438400byte)
PeakPagedMemorySize64: 13.8MB (14438400byte)
UserProcessorTime: 00:00:00.0781250
TotalProcessorTime: 00:00:00.1093750
PrivilegedProcessorTime: 00:00:00.0312500

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: en-US
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.22631.0
Runtime Version: 4.0.30319.42000
System Uptime: 554933375
Machine Name:
Processor Count: 16
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Object reference not set to an instance of an object.
Stack Trace:
at ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
at ShutdownTimer.Helpers.SettingsProvider.Load()
at ShutdownTimer.Program.Main(String[] args)

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

Not a issue but a feature request

Enable timer reset on Mouse / cursor move. Seems the Powercfg.cfg system in windows is blocked sometimes and system will remain running regardless of settings if say a video is paused in background. So if this app could emulate the windows system by not activating until the mouse ceases movement then it would be a perfect addition/replacement.

Feature Request: Adjust timer while active / hotkeys / add or remove set times

These are features I think would improve this shutdown timer to be of use for not only average users but a streamer/content creator as well...

  1. Hot-keys that can operate current and requested features while program is running.
  2. Adjust time while it is active - It would be nice to have a tab in the right click menu to adjust the timer to an exact time that doesn't disrupt the timer till "enter" is pressed.
  3. Ability to add or remove preset or custom time ranges in seconds, minutes and hours (+/- 30seconds, 1 minute, 5 minutes etc)
  4. Toggle transparent background so the timer can be added to OBS or other streaming and recording software
  5. Custom window background and boarder colors themes or choice of custom background from user images
  6. Toggle custom warning sounds that plays when timer gets close to ending, has time added and time time taken away that can be changed to preset sounds or a choice from users own sound
  7. Ability to pause the timer without ending it or shutting it down

Why all the streaming talk? well I think it would be a unique and fun challenge method for gamers to try and play games with a timer active which can be changed by the chat or by set rules by the users. like chat adding or taking time for donations, bits, channel points, follows etc. The custom sounds and window design would be to put pressure and resemble themes of the channel to keep things fresh and active. A transparent toggle would help save on CPU usage rather than using alpha key or other background removal techniques. Hotkeys would also make things faster and allow for users to operate while continuing their work or gameplay. Also if their some kind of interactive streamer software where chat can control the streamers keyboard they use the hotkeys to add, remove or pause time personally.

Feature Request: Select time of day for timer

Requested via Email

Application should have a second option to specify the time of day you want the power action to be executed. The application would calculate the correct time for a shutdown for itself.

Feature request: reset the timer on mouse movement and add custom commands

Im looking since years for a opensource program for Windows like this tool, where you can trust the code and wont have to worry that maybe it contains malicious code, which offers the functionality like your tool but also keeps the laptop entering standby / execute command after n time and m no mouse movements.

Could you please implement these simple features:

  • timer which resets when you move the mouse
  • after timer, system executes command, you could use internal command like standby/shutdown/hibernate, or let the user configure a executable or bat file

Feature request: Full CLI version

Hi, it would be awesome if there exist an CLI version without GUI of this, but which show the remaining time on cmd for use it on batch scripts.
Cheers.

Computer update

What happens if I set a timer with Shutdown Timer Classic just as the computer is downloading and installing an update (so it will restart itself) ?

Feature Request: Set Window Size

I would be nice to be able to set window size or maybe have an option for a smaller timer window. Another idea would be to minimize the time and intergrate it into the Windows Taskbar.

Feature request: shutdown at a fixed schedule

For those of us for whom Windows Task Scheduler simple "shutdown /s" only works half of the time, provide the possibility to define a shutdown time not in terms of a timespan but of a fixed schedule.

Bonus: ShutDownTimerClassic launches automatically on windows startup and automatically creates a shutdown time according to latest specified schedule.

Feature Request: Give preset choice of additional time / fullscreen at 30sec mark / beep at 10sec mark

Thankyou for this excellent app ! I have been searching an app to replacement a 15 years old shutdown vbscript for a long time and your app work amazing !

May I suggest the following features

  • below the countdown timer have 4 to 5 user definable "snooze" time, like "delay 15 min", "delay 30 min", "delay 120 min", "delay 3 days", "delay 6 days", "cancel" - with this, user can quickly snooze/add additional time for whatever they are doing.
  • when it come to 30seconds left or user definable time, force app to be on top of all apps and go full screen (maximize windows) and allow user to restore windows back to normal. This will force user to acknowledge this app.
  • when it comes to 10seconds left or user definable time, start beeping speaker, that is to give user final alert should they have minimized or put it at background.

[email protected] experienced a critical exception

---- Process Info ----
PID: 9104
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 12/9/2023 6:59:52 PM
PeakWorkingSet64: 22.9MB (23969792byte)
WorkingSet64: 22.9MB (23969792byte)
PeakWorkingSet64: 22.9MB (23969792byte)
PrivateMemorySize64: 13.5MB (14188544byte)
VirtualMemorySize64: 193.9MB (203370496byte)
PeakVirtualMemorySize64: 194.3MB (203698176byte)
PagedSystemMemorySize64: 296.6KB (303768byte)
NonpagedSystemMemorySize64: 21.7KB (22192byte)
PagedMemorySize64: 13.5MB (14188544byte)
PeakPagedMemorySize64: 13.5MB (14188544byte)
UserProcessorTime: 00:00:00.0156250
TotalProcessorTime: 00:00:00.0468750
PrivilegedProcessorTime: 00:00:00.0312500

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: en-US
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.22621.0
Runtime Version: 4.0.30319.42000
System Uptime: 388953
Machine Name: DESKTOP-N15HQ2E
Processor Count: 12
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Object reference not set to an instance of an object.
Stack Trace:
at ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
at ShutdownTimer.Helpers.SettingsProvider.Load()
at ShutdownTimer.Program.Main(String[] args)

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.