- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
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?
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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:
#!/bin/sh -f
FIRST=$(qsub job1.sh)
echo $FIRST
SECOND=$(qsub -W depend=afterany:$FIRST job2.sh)
echo $SECOND
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.
Regards,
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please give us an update?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you, so we will close this inquiry now. If you need further assistance, please post a new question.
Regards,
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page