schedsvc: Add Task Scheduler service. Try 2.

Dmitry Timoshkov dmitry at
Thu Mar 6 05:20:38 CST 2014

Alexandre Julliard <julliard at> wrote:

> >> It needs a more convincing argument. For instance, why do you need this
> >> service
> >
> > I have an application that depends on this.
> Depends how?

At installation time it schedules a task which should be executed when
the installer exits, also it creates a task which checks for updates.

> >> where does the interface definition come from,
> >
> > It's documented in MSDN:
> >
> >
> >> why does it need a global header
> >
> > If you mean a global .idl then it follows what's already present
> > for the services.exe service since it's also a service exporting
> > public RPC API.
> If it's not used outside of the dll there's no reason to have a global
> header.

I'm planning to use it from taskschd.dll, and have already started this.

> >> why does the service need to run constantly, etc.
> >
> > Task scheduler service needs to run constantly because it may need
> > to handle various events like user login/logout, tasks starting when
> > the system becomes idle, network connects/disconnects, tasks starting
> > at any specified date and time, and many other types of triggers.
> That's not very convincing. If we really want that sort of support it
> would have to be integrated with the OS, it can't be done from a Wine
> service.

Well, I've been thinking of it, and a Wine session lifetime could be
considered as a short-living Windows machine, with all the limitations.
And there are a lot of various things that the task scheduler is able
to do that I don't know how could be mapped say into cron for instance,
like executing a COM handler, or supporting many kinds of triggers.

There are many known use cases for the task scheduler like a task
regularly checking for updates, or a task executed on user logon,
or a task being executed on a network connection. For a list of
various tasks you could check system32\tasks on any Vista+ system,
there are pretty interesting examples in there.


More information about the wine-devel mailing list