Skip to content

[Feature] Support windows service setup for pueued #344

@simonsan

Description

@simonsan

First, I was unsure if this would be a bug report or a feature request.

But as pueued says in the help text:

-d, --daemonize           If this flag is set, the daemon will start and fork itself into the
                          background. Closing the terminal won't kill the daemon any longer.
                          This should be avoided and rather be properly done using a service
                          manager

It should be easy to set up a service.

Describe the bug

Created Windows services time out, because (this is what I assume) pueued misses handling of Windows service events.

Steps to reproduce the bug

  1. Trying to create a service on Windows 10. I did this the following way, which I found most easy within Powershell:
$params = @{
    Name = "pueued"
    BinaryPathName = "C:\Users\dailyuse\scoop\apps\pueue\current\pueued.exe"
    DisplayName = "Pueue Service"
    StartupType = "Automatic"
    Description = "Service to manage pueue task management tool"
}

New-Service @params

Et voilà, this should be it.

  1. But when starting the service with Start-Service pueued it times out.
  2. I assume that is because pueued doesn't handle the Windows service events.

Expected behaviour

pueued should be easy to set up as a service.

Logs/Output

Start-Service: Service 'Pueue Service (pueued)' cannot be started due to the following error: Cannot start service 'pueued' on computer '.'.

Which is most likely a related error to

Error 1053: The Service did not respond to the start or control request in a timely fashion

Because I see it timing out in services.msc.

Additional context

  • Windows 10 Pro 21H2 19044.1865
  • pueue 2.1.0

Useful crates

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: Help wantedo: WindowsA Windows OS exclusive issues: DaemonThis issue touches pueue daemont: FeatureA new feature that needs implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions