Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wake a Windows PC and start recording (Task Scheduler how-to)
11-03-2024, 05:23
Post: #1
Wake a Windows PC and start recording (Task Scheduler how-to)
There is more than one way to wake a Windows 10 desktop PC and start a Minimstreamer recording. I used this procedure: • Set up a task in Windows' Task Scheduler. • Check your power plan. • Have Minimserver active. • Put the computer to Sleep (not Hibernate). The recording starts at your chosen time while you are asleep.

Task Scheduler controls a Windows service. You can launch it by entering Task Scheduler in the Start box on the taskbar. Choose Create Basic Task. I attach four panels with settings that worked for me.
Why 5:59 a.m.? Set the wake time a minute before you want recording to begin. When wake time was exactly the time that I set Minimstreamer to begin recording, I missed the boat and got nothing.
The action uses Minimserver's script capability to set the stream recording property.

The power plan, accessible from Windows Control Panel, must allow wake timers. I attach a screenshot of the dialog box. I set the power plan to give the computer enough hours to capture the recording before going back to sleep.

(Corrections welcome.)


Find all posts by this user
Quote this message in a reply
11-03-2024, 08:28
Post: #2
RE: Wake a Windows PC and start recording (Task Scheduler how-to)
Thanks for sharing this.
Find all posts by this user
Quote this message in a reply
17-04-2024, 05:19
Post: #3
Improvements in scheduled recording to deal with Windows sleep
Using Task Scheduler to wake up a Windows 10 PC and start Ministreamer recording proved to be a delicate thing. Recording often did not start, or it stopped on its own after a couple of minutes – until I discovered a key sleep parameter in Windows. In addition to the settings in the original post, I suggest the following.

* Lengthen the Windows setting for "System unattended sleep timeout." The Task Scheduler task will wake the computer in order to execute the action. Your usual PC power plan settings for staying awake do not govern how long this wake state lasts. Instead, Windows has an _unattended_ timeout after which it goes to sleep.
The default is only two minutes. This probably explains why, as I played with different settings, sometimes recording would start then end after two minutes or so.
Set the timeout long enough to record the entire program of interest to you, or long enough that you will come to the computer and log on, at which moment the computer is no longer "unattended." Windows normally hides the unattended parameter from the user! There is a simple set of steps to make it visible and set it at

* Use the Minimserver + parameter in the recording command, for example, KCSM+0600. Trigger the task to begin a minute before this time, 5:59 a.m. in this example.

* The TS setting Run with highest privileges can be left unchecked.

* Recording works whether TS is set for Run whether user logged on or not, or Run only when user is logged on. However, this setting might be involved with certain situations (which I cannot specify precisely yet) in which Minimserver is not found by BubbleUPnP Server nor the BubbleUPnP Android app. It must be relaunched from its desktop icon.

While experimenting, before the Windows sleep problem was solved, I sometimes ran into failure to record. The log described:
MinimStreamer: scheduled recording task KCSM
MinimStreamer: started recording task KCSM
MinimStreamer: recording task KCSM has completed
MinimStreamer: removed recording task KCSM
MinimServer: exception while processing HTTP request: Software caused connection abort: socket write error Software caused connection abort: socket write error
at Method)
at Source)
at Source)
at org.jminim.lib.HTTPContext.sendResponse(
at org.jminim.lib.HTTPContext.errorResponse(
at com.minimserver.ServerConfigHandler.writeResource(​
at com.minimserver.ServerConfigHandler.processRequest(​
at org.jminim.lib.HTTPConnection$WriterThread.runWriterThread(​75)
at org.jminim.lib.HTTPConnection$
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)