76 | * Returns the jobName appended by the trigger name suffix
77 | *
78 | *
79 | * @param jobName
80 | * @return
81 | */
82 | public static String getTriggerName(String jobName) {
83 | StringBuffer sb = new StringBuffer();
84 | sb.append(jobName);
85 | sb.append(Constants.TRIGGER_SUFFIX);
86 | return sb.toString();
87 | }
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/spring/batch/jobs/sample-batch-job.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | <#include "quartzJobSchedule.ftl">
7 |
8 | <#if quartzJobInfo?? && quartzJobInstances?? && quartzJobInstances?size!=0>
9 |
10 |
11 |
Job Instances for Job (${quartzJobInfo.name})
12 |
13 |
14 |
15 |
16 | ID |
17 | |
18 | JobExecution Count |
19 | Last JobExecution |
20 | Last JobExecution Date |
21 | Last JobExecution Start |
22 | Last JobExecution Duration |
23 | Last JobExecution Parameters |
24 |
25 |
26 |
27 | <#list quartzJobInstances as quartzJobInstanceInfo>
28 | <#if quartzJobInstanceInfo_index % 2 == 0>
29 | <#assign rowClass="name-sublevel1-even"/>
30 | <#else>
31 | <#assign rowClass="name-sublevel1-odd"/>
32 | #if>
33 | <#assign executions_url><@spring.url relativeUrl="${servletPath}/jobs/${quartzJobInfo.name}/${quartzJobInstanceInfo.id?c}"/>#assign>
34 |
35 | ${quartzJobInstanceInfo.id} |
36 | executions |
37 | ${quartzJobInstanceInfo.jobExecutionCount} |
38 | <#if quartzJobInstanceInfo.lastJobExecution??>
39 | <#assign execution_url><@spring.url relativeUrl="${servletPath}/jobs/executions/${quartzJobInstanceInfo.lastJobExecution.id?c}"/>#assign>
40 | ${quartzJobInstanceInfo.lastJobExecution.status} |
41 | ${quartzJobInstanceInfo.lastJobExecutionInfo.startDate} |
42 | ${quartzJobInstanceInfo.lastJobExecutionInfo.startTime} |
43 | ${quartzJobInstanceInfo.lastJobExecutionInfo.duration} |
44 | ${quartzJobInstanceInfo.lastJobExecution.jobParameters} |
45 | <#else>
46 | ? |
47 | ? |
48 | ? |
49 | ? |
50 | ? |
51 | #if>
52 |
53 | #list>
54 |
55 |
56 |
57 | - Rows: ${startQuartzJobInstance}-${endQuartzJobInstance} of ${totalQuartzJobInstances}
58 | <#assign job_url><@spring.url relativeUrl="${servletPath}/jobs/${quartzJobInfo.name}"/>#assign>
59 | <#if nextQuartzJobInstance??>- Next
#if>
60 | <#if previousQuartzJobInstance??>- Previous
#if>
61 |
62 | - Page Size: ${pageSize!20}
63 |
64 |
65 |
The table above shows instances of this job with an indication of the status of the last execution.
66 | If you want to look at all executions for see here.
67 |
68 | <#else>
69 | <#if quartzJobName??>
70 | <@spring.bind path="quartzJobName" />
71 | <@spring.showErrors separator="
" classOrStyle="error" />
72 | <#else>
73 |
There are no job instances for this job.
74 | #if>
75 | #if>
76 |
77 |
78 | #escape>
--------------------------------------------------------------------------------
/src/main/resources/org/springframework/batch/admin/web/manager/quartz/html/quartzJobSchedule.ftl:
--------------------------------------------------------------------------------
1 | <#escape x as x?html>
2 | <#if quartzJobInfo?? && quartzJobInfo.launchable>
3 |