1 | #!/bin/ksh |
---|
2 | #=========== Global directives =========== |
---|
3 | # @ job_name = conso |
---|
4 | # @ shell = /bin/ksh |
---|
5 | # @ output = log/$(job_name).$(step_name).$(jobid) |
---|
6 | # @ error = $(output) |
---|
7 | ## Date de demarrage calculee |
---|
8 | #STARTDATE |
---|
9 | ## Pour adapp |
---|
10 | # @ requirements = (Feature == "prepost") |
---|
11 | |
---|
12 | #=========== Step 1 directives =========== |
---|
13 | #============== Before execution ================= |
---|
14 | # @ step_name = before_execution |
---|
15 | ## Pour adapp |
---|
16 | # @ requirements = (Feature == "prepost") |
---|
17 | ## Type de travail |
---|
18 | # @ job_type = serial |
---|
19 | ## Temp CPU max |
---|
20 | # @ wall_clock_limit = 1:00:00 |
---|
21 | # @ queue |
---|
22 | |
---|
23 | #=========== Step 2 directives =========== |
---|
24 | #============= Execution ============= |
---|
25 | # @ step_name = execution |
---|
26 | ## Dependance |
---|
27 | # @ dependency = (before_execution == 0) |
---|
28 | ## Pour adapp |
---|
29 | # @ requirements = (Feature == "prepost") |
---|
30 | ## Type de travail |
---|
31 | # @ job_type = serial |
---|
32 | ## Temp CPU max |
---|
33 | # @ wall_clock_limit = 1:00:00 |
---|
34 | # @ queue |
---|
35 | |
---|
36 | # #=========== Step 3 directives =========== |
---|
37 | # #============== After execution ================= |
---|
38 | # # @ step_name = after_execution |
---|
39 | # ## Dependance |
---|
40 | # # @ dependency = (execution == 0) |
---|
41 | # ## Pour adapp |
---|
42 | # # @ requirements = (Feature == "prepost") |
---|
43 | # ## Type de travail |
---|
44 | # # @ job_type = serial |
---|
45 | # ## Temp CPU max |
---|
46 | # # @ wall_clock_limit = 1:00:00 |
---|
47 | # # @ queue |
---|
48 | |
---|
49 | case ${LOADL_STEP_NAME} in |
---|
50 | #============ Step 1 commands ============ |
---|
51 | #======= Sequential preprocessing ======== |
---|
52 | before_execution ) |
---|
53 | set -vx |
---|
54 | # ${LOADL_STEP_INITDIR} == repertoire ou a ete fait le llsubmit |
---|
55 | cd ${LOADL_STEP_INITDIR} |
---|
56 | # Calcul de la date suivante : + 1 jours |
---|
57 | #demain=$(date "+%m/%d/%Y %H:%M" --date "+1 days") |
---|
58 | demain=$(date "+%m/%d/%Y 23:00" --date "+1 days") |
---|
59 | sed s%^#STARTDATE%"# @ startdate = ${demain}"%g job_conso > job_tmp |
---|
60 | # Soumission de la prochaine recolte |
---|
61 | llsubmit job_tmp |
---|
62 | rm job_tmp |
---|
63 | ;; |
---|
64 | |
---|
65 | #=========== Step 2 directives =========== |
---|
66 | #========== Sequential execution ========= |
---|
67 | execution ) |
---|
68 | set -vx |
---|
69 | ${LOADL_STEP_INITDIR}/bin/recolte.sh |
---|
70 | ;; |
---|
71 | |
---|
72 | # #=========== Step 3 directives =========== |
---|
73 | # #============ After execution ============ |
---|
74 | # after_execution ) |
---|
75 | # set -vx |
---|
76 | # cd ${LOADL_STEP_INITDIR} |
---|
77 | # echo "Ok!" > done.txt |
---|
78 | # ;; |
---|
79 | |
---|
80 | esac |
---|
81 | |
---|