Hi, I have got a very good experience with nssm (https://nssm.cc/).
I make a batch file that runs
  cd where-my-production.ini-rests
  pserve production.ini
which is then run by nssm as a service.
If you insist on powershell, are the ` in your ...Name "C:/*`*Program Files
*`*/genera... really
back-ticks (or whatever they are called)? I believe there might be a
problem. Try using ' and
try quoting the whole path:
> New-Service -Name "gen_excel" -DisplayName "generador de excel"
-Description "webapp para generador de excel" -BinaryPathName "'C:/Program
Files/generador_excel/venv/Scripts/pserve.exe' 'C:/Program
Files/generador_excel/production.ini'"

--
Petr


On Mon, Nov 4, 2019 at 3:05 AM Jesús Martí­nez <[email protected]> wrote:

> Hi everyone.
>
> i know there is a link for what i am going to ask (
> https://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/deployment/windows.html)
> but please bear with me.
>
> I have a pyramid app i can launch with pserve and i want to make it a
> service in windows. I found that powershell now offers a tool to run .exe's
> as services called New-service, the instructions in the link above nowhere
> refer to this tool and that makes me think that maybe it is a little
> outdated. Can we not use the New-service cmdlet to create the service?
>
> In my case i created a service with this:
> > New-Service -Name "gen_excel" -DisplayName "generador de excel"
> -Description "webapp para generador de excel" -BinaryPathName "C:/`Program
> Files`/generador_excel/venv/Scripts/pserve.exe C:/`Program
> Files`/generador_excel/production.ini"
>
> and i get a positive response, the service is created but when i try to
> run it i get ERROR 1053 "service didnt respond in timely manner" or
> something like that. (i get response in spanish, tried to translate it for
> you).
>
> between the many posibles ways to escape blankspaces and the little
> verbosity of the error i just cant make this work.
>
> have any of you gone this route (creating service with New-service)? how
> did you make it work?
>
> thanks. regards
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/31aa7d27-6fe1-494b-bda3-77a5c5362401%40googlegroups.com
> <https://groups.google.com/d/msgid/pylons-discuss/31aa7d27-6fe1-494b-bda3-77a5c5362401%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
https://blahos.com/
https://traceability.cz/

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CA%2ByMeXU8DKTO0%3D0pf46wErizxsWnPa4haEz%3DUqPeii1dzasdog%40mail.gmail.com.

Reply via email to