scheduler.smarty
2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<span class="descriptiveText">{i18n}The scheduler runs document indexing and various house keeping tasks, etc in the background.{/i18n}</span>
{if $lasttime}
<span class="descriptiveText">{i18n arg_time=$lasttime}The last time these tasks were performed was on #time#.{/i18n}</span>
{else}
<span class="descriptiveText">{i18n}It has never been implemented.{/i18n}</span>
{/if}
<span><a href="{$sAdmin}">Administration page</a></span>
<p>
{if $isDue}
<span class="">{i18n arg_time=$timedif}The tasks were scheduled to be run #time# ago.{/i18n}</span>
{else}
<span class="">{i18n arg_time=$timedif}The tasks are scheduled to be run in #time#.{/i18n}</span>
{/if}
</p>
{if $bWin}
<p>
{i18n}Please ensure that the scheduler is listed in the Windows Scheduled Tasks. To view the list of scheduled tasks, open the Control Panel and go to Scheduled Tasks. For further information on how to add or update a task, please refer to the documentation.{/i18n}
</p>
<p>
<strong><span onclick="{$onClick}">
<img id="scheduler_icon" src="{$sImg}"/>
{i18n}Brief Guide to Scheduled Tasks:{/i18n}</span></strong>
<div id="cronguide" style="display: none; visibility: hidden;">
If the scheduler is not in the list of jobs then add it by clicking on "Add Scheduled Task" or by right-clicking and selecting New->Scheduled Task. If the scheduler exists then right-click on it and select Properties.
<br /><br />Set the following:
<ul>
<li>Task to run = path/to/knowledgetree/bin/scheduler.php</li>
<li>Frequency = Daily at midnight</li>
<li>Under advanced, set it to repeat every 5 minutes</li>
</ul>
</div>
</p>
{else}
<p>
{i18n}Please ensure that the scheduler is listed in your cron jobs. The line to be added to the crontab to implement the cron job is: {/i18n}
<ul><li>*/5 * * * * {$sPath} > /dev/null</li></ul>
</p>
<p>
<strong><span onclick="{$onClick}">
<img id="scheduler_icon" src="{$sImg}"/>
{i18n}Guide to using cron:{/i18n}</span></strong>
<div id="cronguide" style="display: none; visibility: hidden;">
<ul>
<li>{i18n}View jobs in the crontab:{/i18n} crontab -l</li>
<li>{i18n}Edit the crontab:{/i18n} crontab -e
<ol><li>{i18n}Press 'o' to start a new line.{/i18n}</li>
<li>{i18n}Press 'i' to edit a line.{/i18n}</li>
<li>{i18n}Press the 'esc' key to exit the edit mode.{/i18n}</li>
<li>{i18n}Type ZZ to save changes and exit.{/i18n}</li>
<li>{i18n}Type :q! to exit without saving.{/i18n}</li>
</ol>
</ul>
</div>
</p>
{/if}