diff --git a/_sources/oar.rst.txt b/_sources/oar.rst.txt index 1827df8..cb71410 100644 --- a/_sources/oar.rst.txt +++ b/_sources/oar.rst.txt @@ -40,6 +40,25 @@ You can cancel all your jobs at once by typing: where username should be replaced by your ID. +Record the last Job ID and state +-------------------------------- + +It can be useful to record the ID of the last launched job. + +.. code:: bash + + oarsub -S ./myjob.sh + oarstat -u username | awk '{print $1}' | tail -n 1 > last_job_id.txt + +where username should be replaced by your ID. The file `last_job_id.txt` +will contain the ID of the last launched job. You can also record the entire state +of the job: + +.. code:: bash + + last_job_id=$(oarstat -u username | awk '{print $1}' | tail -n 1) + oarstat -u username -j "$last_job_id" > last_job_state.txt + Launch Multiple Jobs -------------------- diff --git a/oar.html b/oar.html index 64cf8bf..02f441d 100644 --- a/oar.html +++ b/oar.html @@ -148,6 +148,21 @@
It can be useful to record the ID of the last launched job.
+oarsub -S ./myjob.sh
+oarstat -u username | awk '{print $1}' | tail -n 1 > last_job_id.txt
+
where username should be replaced by your ID. The file last_job_id.txt +will contain the ID of the last launched job. You can also record the entire state +of the job:
+last_job_id=$(oarstat -u username | awk '{print $1}' | tail -n 1)
+oarstat -u username -j "$last_job_id" > last_job_state.txt
+
Here, tips to efficiently launch multiple jobs are provided.
@@ -181,6 +196,7 @@