Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

running mvn exec in the background of remote server

Trying to run mvn exec:java -Dexec.mainClass.

that run a long process (could take up to 16 hours) on EC2 but whenever I lose connection with the remote server, the process stopped. I was wondering if I can run this in the background that doesn't affect my connection with EC2 remote server.

like image 518
Maged Makled Avatar asked Jul 30 '14 03:07

Maged Makled


1 Answers

Are you just running it on the command line? You can use nohup (http://linux.101hacks.com/unix/nohup-command/)

nohup mvn exec:java -Dexec.mainClass &
like image 67
Khary Mendez Avatar answered Sep 17 '22 06:09

Khary Mendez