Skip to content

Commit

Permalink
Merge pull request #14 from psm-compute/OAR-state
Browse files Browse the repository at this point in the history
Added tip to record job state
  • Loading branch information
simongravelle authored Oct 25, 2024
2 parents d0453cd + 41927bc commit b8278f1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/source/oar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------

Expand Down

0 comments on commit b8278f1

Please sign in to comment.