Reputation: 21
How can I call a python script to run from a pbs job? Some more details: I am currently working with a pbs file of the following shape (this part works perfectly and shouldn't be altered):
#!/bin/bash
#PBS -N # work name
#PBS -q
#PBS -l
#PBS -S /bin/bash
#PBS -m
##PBS -M #my email
cd $PBS_O_WORKDIR
I have to modify it so after the calculation above finishes a python script (which works on the output file) will be called. The calculation takes a few minutes to finish so a delay before the calling for the python script has to be specified. I have no knowledge in bash programming so it's a real struggle for me.
Upvotes: 2
Views: 4311
Reputation: 5396
You just have to add the lines to call the python script:
#!/bin/bash
#PBS -N # work name
#PBS -q
#PBS -l
#PBS -S /bin/bash
#PBS -m
##PBS -M #my email
cd $PBS_O_WORKDIR
python3 my_python_script.py
Upvotes: 4