Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket Pipeline on Windows How to Execute the Script always

lprada August 23, 2022

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2022

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
AUG Leaders

Atlassian Community Events