WindowsTaskService class

Runs the Hub/Node as a Windows Task Scheduler task instead of a Service Control Manager service.

A plain Dart console app cannot perform the in-process SCM handshake (StartServiceCtrlDispatcherSetServiceStatus), so registering it as an SCM service yields error 1053 ("did not respond to the start … in time"). Task Scheduler runs ordinary console programs as background daemons with no such requirement, so this backend drives schtasks.exe to install, control and query a boot/logon-triggered task that auto-restarts on failure.

Constructors

WindowsTaskService({ProcessRunner? runner})
Creates a Task Scheduler backend, optionally with a custom runner.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

install(ServiceDescriptor d, {bool force = false, bool startNow = true}) Future<void>
Installs (or, with force, replaces) the task for d and optionally starts it immediately.
logPathFor(ServiceDescriptor d) String
Resolves the log file path: under OMNYSHELL_HOME when the descriptor sets it, else %LOCALAPPDATA%\OmnyShell\<role>.log.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(ServiceDescriptor d) String
Renders the XML and the schtasks create command for --dry-run.
restart(String role) Future<void>
Restarts the task for role.
start(String role) Future<void>
Starts the installed task for role.
status(String role) Future<String>
Returns a short status word (running / ready / disabled / not installed / unknown) for role.
stop(String role) Future<void>
Stops the running task for role.
toString() String
A string representation of this object.
inherited
uninstall(String role) Future<void>
Stops and deletes the task for role.

Operators

operator ==(Object other) bool
The equality operator.
inherited