title: How to run nohup command in mesos without spanning multiple jobs
body: <p>I'm trying to run a one script file in mesos in background by using nohup command trying, but unfortunately the problem is the script executing successfully but the same scripts spanning as multiple jobs and running all jobs in background.</p>
  
  <p>How can I handle the jobs with out spanning multi jobs, restrict a single jobs after scaling the application in marathon.</p>
  
  <pre><code>**marathon_sample.json**
  
  {
    "id": "/dps/sample",
    "cmd": "nohup sh /tmp/marathon_test/marathon_sample.sh &amp; &gt;&gt; /tmp/marathon_test/marathon_test.log",
    "cpus": 0.1,
    "mem": 512,
    "disk": 1,
    "instances": 0,
    "container": null,
    "constraints": [
      [
        "hostname",
        "LIKE",
        "(lltws0gbeot.sdi.corp.bankofamerica.com)"
      ]
    ],
    "portDefinitions": [
      {
        "port": 0,
        "protocol": "tcp",
        "name": null,
        "labels": null
      }
    ]
  }
  
  **marathon_sample.sh**
  
  #! /bin/sh
  while [ true ] ;
  do
  echo 'Hello Marathon test application'
  sleep 5 ;
  done
  </code></pre>
  
  <p>Can any one help me to run "marathon_sample.sh" in mesos as a background job.</p>