MP3 Alarm - Task Scheduler problem

Status
Not open for further replies.

Vox

Distinguished
Aug 9, 2012
176
2
18,685
Hello,

I set up a wake-up alarm in the Computer management --> Task Scheduler that automatically plays a custom mp3 every morning at 7AM.

My problem:
The speaker is in my monitor and it goes sleep 10 min after idle. It's ok, I don't want to keep it turned on for whole nights. But, when the scheduled alarm comes, it does not automatically turn back on the monitor and therefore its speaker doesn't play the MP3 because the monitor remains in sleep.

I tired various ways to make the alarm turn the monitor back on but failed. Do you have any idea how can I solve this issue? I just need my music file played as an alarm in the mornings.
 
Solution
Make a text file, paste this into it.

<package>
<job id="js">
<script language="JScript">
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys (" ");
WScript.Sleep(1500);
WshShell.Run("d:\mix5.mp3");
</script>
</job>
</package>


replace d:\mix5.mp3 with your mp3 you want to startup.

save this file as whatever.wsf This is windows script format, so the wsf is important.

Set the task scheduler to run whatever.wsf


This will use the windows sendkey to send a spacekey press, which should wake up the monitor, wait 1.5s, then start playing the mp3.
Make a text file, paste this into it.

<package>
<job id="js">
<script language="JScript">
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys (" ");
WScript.Sleep(1500);
WshShell.Run("d:\mix5.mp3");
</script>
</job>
</package>


replace d:\mix5.mp3 with your mp3 you want to startup.

save this file as whatever.wsf This is windows script format, so the wsf is important.

Set the task scheduler to run whatever.wsf


This will use the windows sendkey to send a spacekey press, which should wake up the monitor, wait 1.5s, then start playing the mp3.
 
Solution

Vox

Distinguished
Aug 9, 2012
176
2
18,685


Works perfectly, thank you.
 
Status
Not open for further replies.