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