title: Managing the running time of background jobs. Timing out if not completed after x seconds,
body: <p>I would like to time my background jobs (started with <code>start-job</code>) and time them out after <code>x</code> seconds. I find it hard however to keep track of the running time on each separate job (I am running aprox 400 jobs).</p>
  
  <p>I wish there was a way to time out the job and set it to <code>failed</code> if not <code>completed</code> in X seconds, but I find no timeout-parameter.</p>
  
  <p>What would be a good way to track the individual run-time of the jobs?</p>
  
  <p>I guess I could create a hashtable with start-time of each job and the job-id and check against the <code>running</code> state and do a manual timeout, but that sounds kinda "inventing the wheel". 
  Any ideas?</p>
  
  <p><strong>Edit</strong>
  Thank you everyone for a fruitful discussion and great inspiration on this topic!</p>