After following the instructions to start up a Windows runner, I noticed that the `start.ps1` script runs in the foreground, and ends if I close the terminal session that started it. I'd like to be able to start this script without needing to keep the terminal open, more specifically to start it over SSH.
What is the recommended way to do this? I've tried using `Start-Job` in Powershell 7.3.4, but I get the following error:
OpenError: [localhost] There is an error processing data from the background process. Error reported: [2023-05-02 16:08:53,453] Runner version: 1.463.
Hello @Gabe Klavans ,
Just adding to @Erez Maadani response, currently Windows runners are not natively packaged to run as a Windows service, and we do have a feature request to implement this functionality :
I would encourage you to add your vote to that ticket and also mark yourself as a watcher to receive first-hand updates.
While that feature is not implemented, you can make use of a third-party WinSW wrapper to encapsulate the runner script and run it as a Windows service. You can find detailed instructions on how to achieve that in the below article :
By using the service wrapper, you will not be required to keep the user session alive on the host, as the runner will be executed in the background. You can try to follow the instructions in that article and let us know how it goes.
Thank you, @Gabe Klavans !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The steps were fairly simple and work great! I did have to make sure my machine-wide script execution policy was set to Unsigned so the runner could clone the repo, but that was straight-forward enough from the pipeline execution errors.
Thanks again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah I did see that post. It looks pretty manual, basically bypassing Atlassian’s script. I figured there would be some way recommended by Atlassian themselves to do this considering it’s kind of a huge wall to have to keep a session alive for as long as you want the runner to stay up over SSH, or need graphical access to spawn a terminal to keep it up.
But I suppose I can follow that method if things get cumbersome enough.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.