qsub


Job chaining with qsub


I have a python script which does some stuff to an input-file and then submits a new job using qsub.
As soon as this new submitted job has finished, I want to run the python script again. So basically, the running of this python script has to be linked to the running of the previous job, which the python script itself submitted.
To summarise in code terms. I go into a parent directory and type:
./python_script.py
The python script is structured something like follows (it's much, much more complicated in reality):
def Main():
subdirectory = IdentifySubDirectory()
os.chdir(subdirectory)
EditInputFile()
qsub jobscript.sh
os.chdir(parentdirectory)
How can I do this just using my python script and a jobscript?
Previously I have been using crontab and running it every x hours, but this is an extremely unsatisfactory situation because each simulation takes a different amount of time to run resulting in a lot of dead-time.
Thanks for any help
If this is TORQUE you can use job dependencies to get the behavior you're describing. Job dependency submissions are documented here, just do a find on the word depend and it'll take you right to it.

Related Links

How do I know where my qsub job is running/being written
Pipe Symbol in qsub Job name
SLURM how to qsub a task when another task is finished?
Can multiple qsub submissions read the same group of files?
SGE faild to submit job, attribute is not a memory value
How do you submit a job on multiple queues with Torque?
Maui - preventing jobs from running on the same node
qsub: What is the standard when to get occasional updates on a submitted job?
Submitting a job to qsub generates an error, “Warning: no access to tty”
Running samtools from a qsub
How do I schedule a job on multiple nodes with qsub Univa 8.1.7?
How to specify a fixed job name for jobs submitted by qsub
duplicate jobs in sun grid engine
SGE qsub define variable using bach?
Job chaining with qsub
Determine Load Status in qsub

Categories

HOME
semantic-ui
shopify
visual-studio-2013
youtube-livestreaming-api
d
travis-ci
matplotlib
chaiscript
appmaker
jrebel
algorithmic-trading
onenote-api
deeplearning4j
android-source
finite-group-theory
medium-editor
opera-mini
yeoman-generator
propel2
spring-ws
iup
remove-method
visual-c++-2017
continuous-deployment
image-quality
fetch-api
pentaho-report-designer
partial-application
thinking-sphinx
autofill
data-extraction
ios-ui-automation
oscommerce
bing-maps-api
text-files
parse-android-sdk
cross-entropy
ical-dotnet
mediawiki-extensions
median
asmx
rapidweaver
rhel6
spring-data-hadoop
struts-layout
fedora20
fontconfig
httplib2
communication-protocol
cjson
ruby-2.0
firepath
unsatisfiedlinkerror
shipitjs
uwp-maps
coordinate-transformation
freefem++
supportmapfragment
handlebars.java
getrusage
direct3d12
function-fitting
application-loader
stream-framework
ffprobe
type-mismatch
isml
google-hadoop
adodb
sysfs
multipleselection
ejabberd-saas
chaining
cpan
jcr-sql2
temp-tables
fragment-tab-host
livechat
dmp
snmp4j
mov
java-collections-api
phpdocx
delphi-xe3
android-json-rpc
visual-c++-2010-express
dynamic-proxy
jquery-tabs
installshield-2011
ruboto
multiple-conditions
justgage
lame
marmalade-edk
web-safe-fonts
supersized
jquery-selectbox
coff
opengl-es-lighting
dirty-data
writing
visual-studio-dbpro

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App