Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,189
Community Members
 
Community Events
168
Community Groups

Bitbucket Pipeline on Windows How to Execute the Script always

Hi, how I have to configure the execution of the script every time windows start and how to keep the execution in background.

1 answer

0 votes

Hi @lprada,

I assume that you are referring to a Windows Runner?

I'm not sure how to keep the execution in the background, but if you don't mind running it in the foreground you can do the following:


1. Find the location where you unzipped atlassian-bitbucket-pipelines-runner.zip, let's say this is

C:\Users\<My_User>\Documents\atlassian-bitbucket-pipelines-runner\

2. Create a .cmd file in your computer, named e.g. startRunner.cmd with the following content:

cd C:\Users\<My_User>\Documents\atlassian-bitbucket-pipelines-runner\bin & powerShell C:\Users\<My_User>\Documents\atlassian-bitbucket-pipelines-runner\bin\start.ps1 -accountUuid '{.....}' -runnerUuid '{.....}' -OAuthClientId ..... -OAuthClientSecret ..... -workingDirectory '..\temp'

where

  • C:\Users\<My_User>\Documents replace with the directory where atlassian-bitbucket-pipelines-runner is located
  • the arguments given after C:\Users\<My_User>\Documents\atlassian-bitbucket-pipelines-runner\bin\start.ps1 in the content should be copied from the preconfigured runner command you were given when you created the Windows Runner from Bitbucket website

You can then create a scheduled task in Windows to run the file startRunner.cmd every time your Windows user or another user logs in to Windows.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events