ATLAS Offline Software
BackgroundJobRunner.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4 """
5 BackgroundJobRunner is a JobRunner for running jobs in the background.
6 
7 Written by Juerg Beringer (LBNL) in 2008.
8 """
9 __author__ = 'Juerg Beringer'
10 __version__ = '$Id: BackgroundJobRunner.py 216126 2009-09-29 16:12:59Z atlidbs $'
11 
12 
13 from JobRunner import JobRunner
14 import os
15 
16 
18  """BackgroundJobRunner - run jobs in the background"""
19 
20  def __init__(self,**params):
21  """Constructor (takes any number of parameters as an argument)."""
22  JobRunner.__init__(self,**params)
23 
24  def submitJob(self,jobConfig):
25  """Run a JobRunner job in the background."""
26  scriptfile = jobConfig['scriptfile']
27  logfile = jobConfig['logfile']
28  os.system(scriptfile+' > '+logfile+' 2>&1 &')
29  return None
python.BackgroundJobRunner.BackgroundJobRunner
Definition: BackgroundJobRunner.py:17
python.BackgroundJobRunner.BackgroundJobRunner.__init__
def __init__(self, **params)
Definition: BackgroundJobRunner.py:20
python.BackgroundJobRunner.BackgroundJobRunner.submitJob
def submitJob(self, jobConfig)
Definition: BackgroundJobRunner.py:24
python.JobRunner.JobRunner
Definition: JobRunner.py:99