How to trigger a batch file in Jenkins without waiting for batch execution results and status

Ozgur Kaya

I have a Jenkins job which is building /packaging/ deploying .NET project. I use "Clean Before checkout" git property for each build.

Finally, I'm executing a batch file. This batch file scanning sonar Qube MSBuild, c# analysis and update the code quality results. But It is taking a long time and I don't want to increment Jenkins job's total execution time from 1 minute to 5 minutes. Developers are thinking so the deployment is taking a long time and not finished yet.

I want to run this batch file independent from the Jenkins job and don't want to see the console output in Jenkins. How could I do this without creating a new Jenkins job for each Jenkins project (upstream/downstream projects)

Shahar Hamuzim Rajuan

you need to use the start cmd command,for example:

start YourBatch.bat

This will open a new CMD window and Jenkins won't wait for result.

Bare in mind that if you get an exit code different than 0, it won't fail the build.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Powershell job execution handle batch processing properly without waiting for whole batch to finish

From Dev

Executing Batch File in Jenkins

From Dev

How to run a batch file from Jenkins

From Dev

SQL Server trigger execution in batch updating

From Dev

Windows Batch file execution error

From Dev

How to wait for file to close in batch file than proceed for execution

From Dev

How to split string with "=" without for loop in batch file

From Dev

Batch: Taskkill timeout without waiting for timer

From Dev

Spring Batch Execution Status Backed by Database

From Dev

Spring Batch UNKNOWN status during job execution

From Java

How to prevent auto-closing of console after the execution of batch file

From Dev

Shell Script to Batch file for Jenkins

From Dev

batch file - results in one line

From Dev

Can a Windows batch file call another program without waiting for that program to finish?

From Dev

Why does ffmpeg.exe started from Windows batch file close immediately without waiting for user input?

From Dev

How to return exit status from an HTA (vbscript) to the calling Batch file

From Dev

How to return exit status from an HTA (vbscript) to the calling Batch file

From Dev

Convert .sh file to a batch file for execution in windows

From Dev

Batch readability without compromising execution with variables

From Dev

batch command execution through jenkins not extracting files though it extracts when run as bat file

From Dev

How to create a batch file that creates a batch file that creates a batch file

From Dev

Make Jenkins start a Batch without running forever?

From Dev

Composer exit batch file after finish execution

From Dev

close batch file after execution in java

From Dev

C# batch file execution never exits

From Dev

Fire batch (.bat) file execution and continue

From Dev

Stop execution of batch file on error for sqlplus in oracle

From Dev

Getting input data after execution of batch file

From Dev

Batch file execution issue (CALL does NOT work)

Related Related

  1. 1

    Powershell job execution handle batch processing properly without waiting for whole batch to finish

  2. 2

    Executing Batch File in Jenkins

  3. 3

    How to run a batch file from Jenkins

  4. 4

    SQL Server trigger execution in batch updating

  5. 5

    Windows Batch file execution error

  6. 6

    How to wait for file to close in batch file than proceed for execution

  7. 7

    How to split string with "=" without for loop in batch file

  8. 8

    Batch: Taskkill timeout without waiting for timer

  9. 9

    Spring Batch Execution Status Backed by Database

  10. 10

    Spring Batch UNKNOWN status during job execution

  11. 11

    How to prevent auto-closing of console after the execution of batch file

  12. 12

    Shell Script to Batch file for Jenkins

  13. 13

    batch file - results in one line

  14. 14

    Can a Windows batch file call another program without waiting for that program to finish?

  15. 15

    Why does ffmpeg.exe started from Windows batch file close immediately without waiting for user input?

  16. 16

    How to return exit status from an HTA (vbscript) to the calling Batch file

  17. 17

    How to return exit status from an HTA (vbscript) to the calling Batch file

  18. 18

    Convert .sh file to a batch file for execution in windows

  19. 19

    Batch readability without compromising execution with variables

  20. 20

    batch command execution through jenkins not extracting files though it extracts when run as bat file

  21. 21

    How to create a batch file that creates a batch file that creates a batch file

  22. 22

    Make Jenkins start a Batch without running forever?

  23. 23

    Composer exit batch file after finish execution

  24. 24

    close batch file after execution in java

  25. 25

    C# batch file execution never exits

  26. 26

    Fire batch (.bat) file execution and continue

  27. 27

    Stop execution of batch file on error for sqlplus in oracle

  28. 28

    Getting input data after execution of batch file

  29. 29

    Batch file execution issue (CALL does NOT work)

HotTag

Archive