Wiki source code of Scheduler Job Sheet

Show last authors
1 {{velocity output='false'}}
2 #macro (displayJobProperty $obj $propName)
3 #set ($class = $obj.xWikiClass)
4 #set ($prettyName = $class.get($propName).translatedPrettyName)
5 <dt>
6 <label #if ($xcontext.action == 'edit')for="${class.getName()}_${obj.number}_${propName}"#end>
7 $prettyName
8 </label>
9 #if ($propName == 'script')
10 <span class='xHint'>
11 $services.localization.render('xe.scheduler.job.scriptexplanation')
12 </span>
13 #end
14 </dt>
15 <dd>
16 #if ($propName == 'script' && $xcontext.action == 'view')
17 #set($schedulerScript = $!job.getValue($propName))
18 #if ($schedulerScript != '')
19
20 {{code language='groovy' source="script:schedulerScript"/}}
21
22 #end
23 #else
24 $!doc.display($propName, $obj)
25 #end
26 </dd>
27 #end
28 {{/velocity}}
29
30 {{velocity}}
31 #if ($doc.getObject('XWiki.SchedulerJobClass'))
32 #set ($job = $doc.getObject('XWiki.SchedulerJobClass'))
33 {{html wiki='true' clean='false'}}
34 <div class='xform'>
35 <dl>
36 #displayJobProperty($job 'jobName')
37 #displayJobProperty($job 'jobDescription')
38 #displayJobProperty($job 'cron')
39 #displayJobProperty($job 'script')
40 </dl>
41 </div>
42 {{/html}}
43
44 #if ($xcontext.action == 'edit')
45 {{info}}Below some example of valid cron expression, from the [[official quartz scheduler documentation>>http://www.quartz-scheduler.org/documentation||rel=__blank]]:
46
47 |= Cron expression |= Meaning
48 | **0 15 10 * * ?** | Fire at 10:15am every day
49 | **0 15 10 ? * MON-FRI** | Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday
50 | ** 0 0/5 14 * * ?** | Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day
51 | ** 0 15 10 ? * 6L** | Fire at 10:15am on the last Friday of every month
52 {{/info}}
53 #else
54 [[$services.localization.render('xe.scheduler.job.backtolist')>>Scheduler.WebHome]]
55 #end
56 #else
57 {{warning}}$services.localization.render('xe.scheduler.job.object'){{/warning}}
58 #end
59 {{/velocity}}