ATLAS Offline Software
Loading...
Searching...
No Matches
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"""
5BackgroundJobRunner is a JobRunner for running jobs in the background.
6
7Written 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
13from JobRunner import JobRunner
14import 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