How to transform this as a service

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Feb 20 18:25:26 EST 2018


On Tue, 20 Feb 2018 14:41:42 -0800, Maroso Marco wrote:

> My program seems to have a problem and i don't understand which! Firstly
> it worked and now just went to run it again and it doesnt.
[...]
> Can someone please tell me how to transform it in a service to run on
> Windows?

There is absolutely no point in spending time and effort transforming it 
to a service if your program doesn't work. First you need to fix the 
program so that it can reliably and repeatedly work.


Start by explaining, what do you mean by "doesn't work"? Does it:

- raise an exception;

- silently sit and do nothing for hours;

- cause the computer to catch fire;

- something else?

Explain what you expect the script to do, and what it actually does 
instead.

If there is an exception or error, please COPY AND PASTE the EXACT error 
message, if possible. Don't retype it from memory, summarise it, or take 
a screen shot.

How are you running your script? To make it usable as a service, first 
you have to make sure it is usable from the system command prompt 
(command.com, cmd.exe, PowerShell, or whatever you use on Windows these 
days).

Are you sure you are running your script using the right Python version? 
How do you know?



-- 
Steve




More information about the Python-list mailing list