I'm using a script to execute jobs.
after the script is done I execute another script (must be after the first one is finished)
my question is if I can do it automatically, are there any commands that can check if the job's queue is empty? can someone share with me an example?
echo "cd tmp/ilan/; /usr/bin/time ~/tmp/jdk1.8.0_271/bin/java -jar Count64.jar -k 60 -NB 256 -t 1" | qsub
this is the command I execute.
after the job was done (mean that if I type 'qstat' I will get nothing on the shell)
I want that another job will start
Thanks for reaching to devcloud forum.
Please follow below guidelines for executing one job after the other.
1. Create separate job files for individual jobs.
2. Create the common script to call this jobs as below:
SECOND=$(qsub -W depend=afterany:$FIRST job2.sh)
3. Execute the attached script (run.sh) to start the execution
I have also attached example scripts below, please go through the same and reach back to us in case of any further queries.
Note: Please change the directory inside run.sh script before running it.
For your information, qstat is the general command which we use to check the job queue.