2

I found a tutorial for using Task Scheduler to use VLC on my computer as an alarm clock. Essentially, it works as follows:

  • Computer boots automatically in the morning 5 minutes before alarm time
  • Use nircmd to set system volume to 50% (nircmd setsysvolume 32768)
  • Call VLC to play my audio file (vlc C:\path\alarm.ogg)

This works well, but there are two problems. First, if I'm up in time, the only way to stop the alarm is to shut down the computer (since the task runs whether I'm logged in or not, I have to shut it all the way down). Second, the file only plays one time, it doesn't continue.

I know VLC has a -L flag to specify to loop the file repeatedly, but this still leaves the first problem. I like this general solution because it doesn't require additional software to be installed; it utilizes VLC which I have installed anyway.

Is there a better way to handle an alarm on my computer? I'm on Windows 8.1 Pro.

  • same as the old clockwork solution - throw the damn thing across the room ;-) [sorry] – Tetsujin May 16 '15 at 19:23
1

First, if I'm up in time, the only way to stop the alarm is to shut down the computer (since the task runs whether I'm logged in or not, I have to shut it all the way down). Second, the file only plays one time, it doesn't continue.

One way to fix this could be to make your script into a service. This way if you got up early you could just go in to the task manager and stop the service. I'm not entirely sure how to manually configure a service in Windows but if you don't mind installing additional software this should be trivial to do using NSSM (the Non-Sucking Service Manager)

0

Say you have the task set to run at 8:00am, and you wake at 7:30am instead. One possible solution could be:

  1. Create a shortcut that runs as admin and disables the task using schtasks /change /disable /tn "taskname". You can assign a keyboard shortcut to it of course to make it easy to invoke.

  2. Create a second task that runs at 8:01am daily and re-enables the first task, so it'll run the next day.

Alternately, you can also set the shortcut to use nircmd to mute the volume, and the second task to unmute (although this will mean your volume will be muted between 7:30am and 8:01am).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.