[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: Andy Levy <andy.levy_at_gmail.com>
Date: Thu, 13 Nov 2008 08:19:07 -0500

On Wed, Nov 12, 2008 at 18:49, Christian <christian_at_atombrenner.de> wrote:
>> 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

I'd rather use cscript.exe. wscript.exe might attempt to pop windows up.

Don't forget to specify the full path to wscript.exe/cscript.exe in
your BAT file. Hooks get an empty or near-empty environment, so you
may not have the %PATH% you think you have.

---------------------------------------------------------------------
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 14:19:23 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.