source:
trunk/VALID/2INSTALL/JOBS/cron_jobs.ksh
@
1128
Last change on this file since 1128 was 795, checked in by ctlod, 16 years ago | |
---|---|
|
|
File size: 898 bytes |
Line | |
---|---|
1 | #!/usr/bin/ksh |
2 | ###################################################### |
3 | # Original : C. Talandier for ESOPA |
4 | # Contact : opatlod@locean-ipsl.upmc.fr |
5 | # |
6 | # This script is launched by the lance_batch.ksh script |
7 | # for a given configuration. |
8 | # It aims to (for each standard configuration) check if |
9 | # there are jobs in queue associated with the considered |
10 | # configuration. |
11 | # If jobs are still in queue it re-launched itself either |
12 | # it launchs the assessment.ksh script |
13 | ###################################################### |
14 | |
15 | #set -xv |
16 | |
17 | CONF=$1 |
18 | LJOBS=qstat |
19 | |
20 | if [ ${CONF} == 'ORCA2_LIM' ] ; then |
21 | CONFS=ORCA2 |
22 | elif [ ${CONF} == 'GYRE_LOBSTER' ] ; then |
23 | CONFS=GYRE_ |
24 | elif [ ${CONF} == 'ZAGRIF' ] ; then |
25 | CONFS=ZAGRI |
26 | else |
27 | CONFS=${CONF} |
28 | fi |
29 | |
30 | JOBS_LIST=` ${LJOBS} | grep -c ${CONFS}` |
31 | if [ ${JOBS_LIST} = 0 ] |
32 | then |
33 | sleep 60 |
34 | ./assessment.ksh ${CONF} yes & |
35 | exit |
36 | fi |
37 | sleep 300 |
38 | ./cron_jobs.ksh ${CONF} & |
39 | exit |
40 |
Note: See TracBrowser
for help on using the repository browser.