How to run VAP using Win7 task scheduler

#1
This is what worked for me on Win7 Pro x64. I don't routinely use the scheduler to run VAP, so this was just tested with a "one-time" scheduled run while I was not logged on.
Note: If you are using user-defined (customized) Output Profiles, you may need to modify these instructions as shown at the end of this post.

Go to: Control Panel .... System and Security ... Administrative Tools .. Schedule Tasks

Select "Create Task..." in Actions Panel on right side. (NOT "Create Basic Task")

ON THE General TAB:
  1. Enter a name in the "Name" entry, e.g., VAP
  2. Verify or change the user account entry under "When running the task, use the following user account". (Should be account VAP normally runs under.)
  3. Check "Run whether user is logged on or not"
  4. Check "Run with highest privileges" (This is important I believe.)
  5. Do NOT change the "Configure For:" selection.
ON THE Triggers TAB:
Click "New" to add a trigger and set the desired trigger schedule. Check the "Enabled" checkbox at bottom left. For initial testing a single trigger that starts in about 5 minutes from "now" might be a good idea.

ON THE Actions TAB:
  1. Click "New" and on the panel that pops up:
  2. Choose "Start a program" for the Action entry.
  3. For the "Program/script" entry, click Browse and select the VideoReDoAutoprocessor.exe file in your VAP install folder.
  4. Fill in the "Add arguments (optional) entry, e.g., -hotstart -shutdown:90
  5. Enter the folder path to VAP executable in: "Start in (optional)".
    Important: Do NOT use quotes. Do NOT include the final backslash ('\').
ON THE Conditions TAB:
I didn't change anything here but do whatever you think best.

ON THE Settings TAB:
  1. I checked only "Allow task to be run on demand" and "If the running task does not end when requested, force it to stop" . I don't think either one of these means anything, assuming you haven't told the scheduler to stop the VAP task (which you shouldn't).
  2. Also select "Do not start a new instance" at lower left.
When you complete configuration and go to save the task, it should ask you to enter the User/Password that goes with the account you specified.

Also, although scheduler-launched VAP and the processes it launches may be running under the same account you are logged into, you cannot see their processes in Task Manager unless you click "Show processes from all users" at the bottom of the Processes tab. If you attempt to launch VAP while the scheduled VAP is running, it will prompt you -- don't do it.

Modifications if above instructions don't work when using user-defined Output Profiles:
Follow the instructions above except:
In the General tab of the scheduler configuration:
1. Check Run only when user is logged on (instead of Run whether user is logged on or not)
2. In the "Configure for" pull down, select Windows 7, Windows Server 2008 R2 (not "Windows Vista, Windows Server 2008")

Of course this configuration requires the user account for which the scheduler item was set up be logged in at trigger time. Also, at startup the VAP UI will pop up for a few seconds and then minimize itself. A possible advantage is that VAP can be maximized (when you are viewing the account it is running in) and you can assess activity and even stop it if desired. Also note that you can have more than one user account logged on at a time.
 
Last edited:
#2
ON THE Triggers TAB:
Click "New" to add a trigger and set the desired trigger schedule. Check the "Enabled" checkbox at bottom left. For initial testing a single trigger that starts in about 5 minutes from "now" might be a good idea.
Suppose my trigger is Media Center Recording = 1.
What happens if a second trigger occurs before the previous trigger-initiated instance has shutdown? I don't think this will happen if "do not start new instance" is set on the settings tab, but I don't have any experience with task scheduler so I'm not positive.

Update: Good news. It appears that new instances are indeed prevented from starting. I just did a quick check and the log indicates that the last run result was "an instance of this task is already running. No ill effects. If you use the MC Recording trigger as I've done, you can set the shutdown or maxidle much shorter than 90, since it'll just start back up when your scheduled recording is finished.
 
Last edited:
#4
One other thing, in case anyone is wondering about whether to use shutdown or maxidle with this type of trigger- Use maxidle if there's a chance that you'll ever record two shows that end at the same time. If your shutdown trigger is shorter than the time it takes to process the first show, the second may not get processed. The documentation is clear on this but it's easy to skip over if, like me, you don't need to read no stinkin' manual. :)
 
#6
??? Where to you see my function "start VRD"? I don't have access to my development system at the moment but if you are referring to one of the .vbs files distributed with VAP, feel free to use it any way you want.
 
#7
Thank you.
I haven't downloaded it yet, so I do not know its name.
I hope to see how you successfully invoke VRD to run inside a "batch" task inside a task scheduler, when the task's flag is set to run "whether the user is logged on or not". It crashes for me when that flag is ticked, so I hope to see what you did to make it run.
Regards

PS is anyone able to post say a zip of "the .vbs files distributed with VAP" (a silly preference not to run any installers if I can get away without it). Thanks.
 
Last edited:
#8
I've read this thread and I (seem) to have done things correctly. If I try running a VAP command under W7 task scheduler with say, a time a few minutes in the future, everything seems to happen as it should. However, when I then schedule the task to run at night (with me still logged on) the task fails. When I check in the morning the VAP window is open and there is an error window opened as attached.


When I dismiss the error window, VAP then restarts and seems to run all the jobs!!! The message in the log file "VRDAutoProcessLog.txt" shows this:

5/26/2014 1:02:50 AM log file C:\Users\Randy Sebra\AppData\Roaming\VAP\VRDAutoProcessLog.txt is too large to display.
5/26/2014 1:02:50 AM Only new log events will be displayed.
5/26/2014 1:02:50 AM All log events will still accumulate in the log file
5/26/2014 1:02:50 AM CL args: -hotstart, -shutdown after idle for 60 minutes
5/26/2014 1:02:50 AM Started program -- VideoReDo-AutoProcessor - Ver. 1.17
5/26/2014 1:02:50 AM Using configuration/data file: C:\Users\Randy Sebra\AppData\Roaming\VAP\VideoFileManager.xml
5/26/2014 1:02:50 AM Comskip files present, so Comskip commercial detection is enabled
5/26/2014 1:02:50 AM Comskip is Early Access (donator) version
5/26/2014 1:03:00 AM VRD install folder: C:\Program Files\VideoReDoPlus\
5/26/2014 1:03:00 AM Read 0 input filename metadata parsing template(s)
5/26/2014 1:03:00 AM Read 0 title translation data lines
5/26/2014 1:03:01 AM ok
5/26/2014 1:03:01 AM Failed to get VRD version number on attempt #1 -- Waiting 20 secs to retry
5/26/2014 1:03:21 AM ok
5/26/2014 1:03:21 AM Failed to get VRD version number on attempt #2 -- Waiting 20 secs to retry
5/26/2014 1:03:41 AM ok
5/26/2014 1:03:41 AM Failed 3 attempts to get VRD version number -- prompting operator to quit VAP -- COM object access failure
Then the process continues as in :

5/26/2014 12:45:58 PM Running VRD version:
5/26/2014 12:45:59 PM Smart QSF is not enabled. Supported only for TVS4 builds of 634 and above
5/26/2014 12:46:25 PM 0 file ignore keys were read
5/26/2014 12:46:25 PM 0 file wildcard match keys were read
5/26/2014 12:46:25 PM Read 0 input filename metadata parsing template(s)
5/26/2014 12:46:25 PM Read 0 title translation data lines
5/26/2014 12:46:25 PM Metadata-based templates:
5/26/2014 12:46:25 PM Series Output Folder = ""
5/26/2014 12:46:25 PM Series Output file = ""
5/26/2014 12:46:25 PM Movie Output Folder = ""
5/26/2014 12:46:25 PM Movie Output File Name = ""
5/26/2014 12:46:25 PM Title = ""
5/26/2014 12:46:26 PM Started QSF, input: Orphan Black - ''To Hound Nature in Her Wanderings'' (Recorded May 24, 2014, BBCAHD).TiVo
5/26/2014 12:46:27 PM MediaInfo failed to provide filter dimensions for this video. No filter will be applied
5/26/2014 12:46:27 PM No filter dimensions apply
5/26/2014 12:46:28 PM VideoReDo said: INFO: VideoReDo version 3.10.3.629 - Nov 9 2011
5/26/2014 12:46:29 PM VideoReDo said: INFO: No QSF filter to apply
5/26/2014 12:50:29 PM VideoReDo completed QSF on input: C:\Users\Randy Sebra\My Documents\My TiVo Recordings\Orphan Black - ''To Hound Nature in Her Wanderings'' (Recorded May 24, 2014, BBCAHD).TiVo
5/26/2014 12:50:31 PM Started ComSkip detection followed by autocuts, input: Orphan Black - ''To Hound Nature in Her Wanderings'' (Recorded May 24, 2014, BBCAHD).TiVo
5/26/2014 12:56:31 PM VideoReDo completed ADSCAN on input: C:\Users\Randy Sebra\My Documents\My TiVo Recordings\Motemp\Orphan Black - ''To Hound Nature in Her Wanderings'' (Recorded May 24, 2014, BBCAHD).mpg
5/26/2014 12:56:33 PM Output file was not renamed
5/26/2014 12:56:34 PM Started auto-cuts, input: Orphan Black - ''To Hound Nature in Her Wanderings'' (Recorded May 24, 2014, BBCAHD)
5/26/2014 12:56:38 PM VideoReDo said: INFO: VideoReDo version 3.10.3.629 - Nov 9 2011
I can only surmise that this has something to do with the PC condition a that time in the morning, but can't figure out why it can't find the VRD version. Where/how is it looking???
 
#9
I don''t see the attached error message.

VAP uses VRD COM functions to run all VRD functions. One such function just returns the VRD version number. So calling it first tests the COM function link (in addition to getting the VRD version). There has always been a mysterious problem that this first COM function call sometimes fails, which is why VAP re-tries twice after 20-sec delays, as indicated in the log. I suspect this relates to some timing problem but that's just a guess. Perhaps the timing issue is worse when Win7 is starting VAP as a scheduled task.

A more likely possibility is a user account privilege issue. Did you configure the task to start only when your user account is logged in? This should only be necessary when using TVS4 and custom Output Profiles.
 
#10
I had problems attaching - it should be there now.. error.jpg

I thought it might be because the PC is hibernating, but I've tried running another program that wakes up the PC before running. Still doesn't work...
 
#11
Got the same error starting VAP from task scheduler.

In Task > Actions > Start a program ==>
MAKE SURE START IN OPTIONAL IS FILLED IN !!!
C:\Program Files (x86)\VAP\

Program = “C:\Program Files (x86)\VAP\VideoRedoAutoProcessor.exe”

Arguments I use -hoststartmax -maxidle:1
 
Top