ATLAS Offline Software
Loading...
Searching...
No Matches
ShellJobRunner.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"""
5ShellJobRunner is a JobRunner for running one job at a time in current shell.
6
7Written by Juerg Beringer (LBNL) in 2008.
8"""
9__author__ = 'Juerg Beringer'
10__version__ = '$Id: ShellJobRunner.py 216126 2009-09-29 16:12:59Z atlidbs $'
11
12
13from JobRunner import JobRunner
14import os
15
16
18 """ShellJobRunner - runs jobs one at a time in current shell"""
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 current shell."""
26 scriptfile = jobConfig['scriptfile']
27 logfile = jobConfig['logfile']
28 status = os.system(scriptfile+' > '+logfile+' 2>&1') >> 8 # Convert to standard Unix exit code
29 return status