Unable to run nohup command from jenkins as a background process

后端 未结 7 1990
醉话见心
醉话见心 2021-02-15 10:59

UPDATE: Based on below discussion I have edited my answer for more accurate description.

I am trying to run a nohup command from jenkins. The full command is

         


        
7条回答
  •  梦如初夏
    2021-02-15 11:26

    Best simple solution is to use "at now" instead of "nohup"

    In your job jenkins (execute shell) put :

    set +e #so "at now" will run even if java -jar fails
    #Run java app in background
    echo "java -jar $(ls | grep *.jar | head -n 1)" | at now + 1 min
    

提交回复
热议问题