In Jenkins there are jobs, you can add that code as a job, that runs before the MSBuild—or whatever build system you are using—step of your Jenkins CI pipeline. This way, the code will run before the job, or after it. The process of adding a job is easy, you just use the GUI of the Jenkins and add a new job, pass the path for the executable, or use the Bash/Batch command-line interface to execute the code manually.
Running the code concurrently in Jenkins is an advanced topic and requires the conceptual understanding of Jenkins and nodes.
Distributed builds - Jenkins - Jenkins Wiki[
^]
Pipeline: Nodes and Processes[
^]
Check the following links,
Jenkins Setup Build Jobs[
^]
Building a software project - Jenkins - Jenkins Wiki[
^]