[python-win32] Service on Win2k and Timer

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed Jul 23 12:21:16 EDT 2003


> kj7ny wrote:

> I believe I am trying to do pretty much the same thing as Sean in the 
> post: "Executing a remote process via WMI in Win32." ... but not nearly 
> at the same advanced level.  (I'm not sure I need to go the WMI route.)

Using WMI isn't necessarily advanced, altho' it needn't be what you
 want, either.

> I am writing Python code to perform remote updates of software across a 
> WAN (all Win2K machines).
...
> I control the entire process with a MySQL database.

This doesn't quite give enough information. Do you have a MySQL database
 on each machine? Do you simply have one on a master machine which
 holds updated settings? Something else?

> I have no problems with any access permissions, with any MySQL access, 
> with the unzip or tweak processes.

Good

> I started the utility by using the py2exe Windows Service sample code.
> I have a service that runs well (as far as I can tell).

So far, I can't see where a service comes into it.

> The issue is my lack of understanding of how to correctly create the 
> timer event within the service.

I can't see what the timer is for, either...

[... snip sensible-sounding stuff about time.sleep ...]

Could you give an outline of what the process is doing, eg (guess):

I have a service on each client machine, waiting for a command from
 a central machine which controls updates on the basis of information
 in a MySQL database. The client service needs to wake up every hour
 to check for any changes to software and then to do whatever unzipping
 and tweaking is necessary. At all other times, the service should lie
 low and consume no resources.

Is this close? Have I got the wrong idea? I'm quite happy to make
 suggestions, either with or without WMI, but I'd rather know more
 clearly what you're trying to do.

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-win32 mailing list