6

I'd like the computer to beep on the hour without having to install an entire third party software just for this.

I tried using Task Scheduler for this, following the steps outlined here, but when I set the task to run a program so I can play a chime, like this...

wmplayer.exe %windir%\media\ding.wav

...It doesn't work (nothing happens), even though it works on the Run dialog. When I explicitly click "Run now" (it's first set to run on a scheduled time), also nothing happens. And when I set it to display a message or send an email instead, it displays an error which apparently means the feature's been deprecated (and the method on that website didn't work either).

So, is there any way to achieve this natively on Windows 10? When I used a Mac, a few years ago, all you had to do was check an option telling the system clock to chime on the hour. I don't get why this VERY SIMPLE AND USEFUL THING needs to be this difficult.

  • Please edit your question and tell us why it doesn't work. Does nothing happen? Do you get an error? Does something else happen? What happens if you make the task, then right-click the task and press Run Now? Does it give you the desired result? – LPChip May 30 '17 at 15:41
  • It does work if you supply the full address to the wmplayer.exe... – Kinnectus May 30 '17 at 15:49
  • @LPChip Nothing happens. I edited the question to add that information. – San Diago May 30 '17 at 15:53
9

Here is a solution which:

  • Doesn't require any additional software to be installed
  • Works on all versions of Windows from XP to 10
  • Doesn't display anything on screen whilst the sound is playing

Save the following code somewhere on your computer with a vbs extension (for example, play_sound.vbs):

Option Explicit

' Change the path and filename below
Dim sound : sound = "C:\Windows\Media\Alarm01.wav"

Dim o : Set o = CreateObject("wmplayer.ocx")
With o
    .url = sound
    .controls.play
    While .playstate <> 1
        wscript.sleep 100
    Wend
    .close
End With

Set o = Nothing

Change the C:\Windows\Media\Alarm01.wav to the full path and filename of the sound you want to play. I've tested files ending wav and mp3 and they work fine, there are probably other formats which work too.

Double click on it and you'll find the sound plays.

Now all you need to do is create a Scheduled Task to call this script every hour on the hour.

Finally, if you're interested, here is a page where you can download the hourly chime that comes from those retro Casio digital watches.

  • Absolutely perfect, exactly what I wanted! Nice touch with the Casio beep as well, that was my inspiration. Thanks! – San Diago May 31 '17 at 15:26
2

In Windows 10. You have built-in app Alarm & Clock.

To set up a new alarm, select New + . Select the item under Sound to choose the alarm sound that works best for you.

Set alarm for everyday at time you need. Example (7am)

Set the Snooze time to One hour. (So u will get alter every one hour)

Once the Alarm altering you. Only you need to click on Snooze

enter image description here

  • But he'll need to click "Snooze" every hour? Bit pointless when the OP is asking for an automated event that will run every hour without intervention... – Kinnectus May 30 '17 at 15:54
  • Sorry unaware of intervention of user – Techie Gossip May 30 '17 at 16:16
  • I ended up setting the snooze to none, and creating an alarm for each hour I wanted the chime. You still have to press Dismiss, but it's not so bad. – Matthew Sep 6 '18 at 3:00
2

If you use the full address of wmplayer.exe then it works. E.g. C:\Program Files\Windows Media Player\wmplayer.exe.

Your WAV argument is fine.

The only problem you'll have with WMP is that it no longer supports automatically closing after playback so your scheduled task can open WMP and play your sound but you'll need to write another Scheduled Task to close WMP a few seconds later as it'll remain open and it won't play the sound again...

You can use VLC player as it has a command line switch that can close the player after it's finished playing. The switch ic vlc:\\quit.

To be brutally honest, you're best looking for an application that will run in the system tray that can play a sound at your preferred interval and it'll probably be more reliable than launching a resource thirsty application for a simple "chime".

  • 2
    nirsoft's nircmd is an even better alternative, it was designed for this kind of stuff. It can even play an actual beep, which is probably even better than playing that ding.wav – LPChip May 30 '17 at 16:40
  • Thanks, it does work but then the player pops up on the forefront, and I would need it to work in the background. You're right that I'd be much better off looking for a simple app that can do that, but even that has proved difficult to come by, believe it or not. – San Diago May 30 '17 at 18:36
1

In addition to previous answers, here's a powershell script that can be run from the task scheduler. Save it to a file with a .ps1 file extention.

$sound = new-Object System.Media.SoundPlayer;
$sound.SoundLocation = "c:\WINDOWS\Media\notify.wav";
$sound.Play();

# If called using "powershell -file thisfile.ps1", you need to add a delay, 
# otherwise the script ends before the sound has played.
Start-Sleep -s 1
1

No User interruption needed means he can rather use VB Script

strSoundFile = “C:\Windows\Media\Ding.wav”
Set objShell = CreateObject(“Wscript.Shell”)
strCommand = “sndrec32 /play /close ” & chr(34) & strSoundFile & chr(34)
objShell.Run strCommand, 0, True 

Paste in Notepad Save as .vbs (Example: Hourly.vbs)

Go to Task Scheduler

  • Under Action, select Create Task. Give the task a name.
  • Set the Trigger parameters (One time – Start date & time, Repeat task every 1 hour, Duration – Indefinitely).
  • Under Actions, click New button. The New Action box will open. Select the action Start a program and browse to the Hourly.vbs file to set the path.

Makes sure you have sndrec32.exe is downloaded and placed in system32 folder for windows 10

OK and Exit.

  • By saying "he needs" you imply that its the only way, which isn't true. – LPChip May 30 '17 at 16:43
  • No I didn't mean that way. He can make a try as his requirements. – Techie Gossip May 30 '17 at 17:19
  • Maybe its a good idea to edit your post and change it to: could use, rather than needs use – LPChip May 30 '17 at 18:04
  • 1
    NO problem changes made – Techie Gossip May 30 '17 at 18:11
  • Thanks for going the extra mile and writing out a script! It didn't quite work (sndrec32 has been deprecated in windows 10) but it gave me some ideas. Thanks again! – San Diago May 30 '17 at 18:20
0

Well all I can do is tell you what worked for me in trying to find out how to disable the chime alarm that played every hour on the hour. It drove me nuts quite frankly but if that is what you are looking to have, you can find it in W10 under the Gadgets called "Date Time." It is a small, thin bar that is displayed on the desktop which shows the date & time. The options function gives you the choice of having an alarm sound every hour. You can do this by clicking on the config tab, then checking the box that says "Hourly Notify -- enable?" By enabling this the computer will chime every hour on the hour. Hope that helps. This is the easiest way to be reminded that each hour has arrived. Enjoy!! :)

  • please fix the formatting of this wall of text ... – Pierre.Vriens Sep 9 '18 at 17:10
  • Sorry, you must have some third-party software, there's nothing native like that on my W10 system. – San Diago Jan 17 '19 at 13:43

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