Windows XP - cron or scheduler for Python?

Roger Upole rupole at hotmail.com
Tue Jun 22 01:08:50 EDT 2004


You can retrieve the startup error code using the Pywin32 package.
(requires build 201)

import pythoncom, win32api
from win32com.taskscheduler import taskscheduler
ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,

pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)
task=ts.Activate('your task name')
exit_code,startup_error_code=task.GetExitCode()
print win32api.FormatMessage(startup_error_code)
  hth
     Roger


"Jay Donnell" <jaydonnell at yahoo.com> wrote in message
news:a6fdfd6b.0406211455.6bd70abf at posting.google.com...
> > 2) Always call Python and have it run the application.
> > Don't just try to run progname.py.
>
> How would one do this. I'm a unix geek having the same problems as the
> op, but I'm on windows 2000. The status simply says "couldn't start".
> Any other ideas would be appreciated as well.





More information about the Python-list mailing list