[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: A solution for starting background jobs on Windows from post-commit hooks

From: Christian <christian_at_atombrenner.de>
Date: Thu, 13 Nov 2008 00:49:49 +0100

> On Wed, Nov 12, 2008 at 09:39, Christian <christian_at_atombrenner.de> wrote:
>> "A solution for how to start a background job from a subversion
>> post-commit hook on windows. See issues 2619, 2560 and 2497"
>>
>>[... lots of C++ code here ...]

> You can also do this in about 5 lines of VBScript or JScript in a
> Windows Script Host script. Use WScript.Shell.Run() and tell it to not
> wait for the other program to complete.
>

Thanks!

All I wanted to say was that you mustn't use "Start" on Windows to start a
background job.

The windows scripting host does the correct thing, I have tested it and it
worked. Indeed, you need a post-commit.bat which calls
"wscript.exe post-commit.vbs" which includes something like this
-------
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run( "yourprogram.exe" & " "WScript.Arguments(0) & " " &
WScript.Arguments(1))
-----------
The default is not to wait so you really need only this two lines pluse one
line in the .bat file :-)

If I only knew before ... ;-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-11-13 10:11:20 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.