https://wiki.uniformserver.com/index.php?title=Coral:_cron_portable_design&feed=atom&action=history
Coral: cron portable design - Revision history
2024-03-29T14:24:18Z
Revision history for this page on the wiki
MediaWiki 1.41.0
https://wiki.uniformserver.com/index.php?title=Coral:_cron_portable_design&diff=6211&oldid=prev
BobS: Punctuation and grammatical changes.
2011-11-14T15:22:29Z
<p>Punctuation and grammatical changes.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:22, 14 November 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l6">Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><span style="margin-bottom:5px;font-size:25px;color: #31799F;">CRON - Portable Design</span></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><span style="margin-bottom:5px;font-size:25px;color: #31799F;">CRON - Portable Design</span></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Running scripts as a service is easy to implement using Rozanski's utility see the following page [[Coral: cron srvstart utility|srvStart utility tutorial]] for details.</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Uniform Server has <del style="font-weight: bold; text-decoration: none;">this </del>utility <del style="font-weight: bold; text-decoration: none;">integrated </del>into Coral’s control architecture allowing portable Cron to run as a service. For anyone wanting to modify or understand how it has been implemented the following <del style="font-weight: bold; text-decoration: none;">describe </del>its operation and design. </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">The </ins>Uniform Server has <ins style="font-weight: bold; text-decoration: none;">integrated Nick Rozanski's srvstart </ins>utility into Coral’s control architecture<ins style="font-weight: bold; text-decoration: none;">, </ins>allowing portable Cron to run as a service. For anyone wanting to modify <ins style="font-weight: bold; text-decoration: none;">it </ins>or understand how it has been implemented<ins style="font-weight: bold; text-decoration: none;">, </ins>the following <ins style="font-weight: bold; text-decoration: none;">describes </ins>its operation and design. </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l71">Line 71:</td>
<td colspan="2" class="diff-lineno">Line 70:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* stop_uninstall_service.bat - Uses the above to stop and remove service.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* stop_uninstall_service.bat - Uses the above to stop and remove service.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">Following </del>provides details for each control file.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">The following </ins>provides details for each control file.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">'''''[[#top | Top]]'''''</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==File description and function==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==File description and function==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For clarity only pertinent information is included (files title block has been removed)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>For clarity only pertinent information is included (files title block has been removed)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===srvstart.ini===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===srvstart.ini===</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This file allows you to specify any number of services to run. Each service is specified in a block starting with a unique name enclosed in square brackets. Uniform Server Cron requires a single block as shown below:</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This file allows you to specify any number of services to run. Each service is specified in a block starting with a unique name enclosed in square brackets. <ins style="font-weight: bold; text-decoration: none;">The </ins>Uniform Server Cron requires a single block as shown below:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l258">Line 258:</td>
<td colspan="2" class="diff-lineno">Line 256:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">'''''[[#top | Top]]'''''</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Server relocation==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Server relocation==</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l277">Line 277:</td>
<td colspan="2" class="diff-lineno">Line 274:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">'''''[[#top | Top]]'''''</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Where to next==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Where to next==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Coral: cron srvstart utility|CRON - SrvStart utility tutorial]]</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Running scripts as a service is easy to implement using Rozanski's utility. The next page </ins>[[Coral: cron srvstart utility|CRON - SrvStart utility tutorial]] <ins style="font-weight: bold; text-decoration: none;">has details about this utility.</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">'''''[[#top | Top]]'''''</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category: Uniform Server 8-Coral]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category: Uniform Server 8-Coral]]</div></td></tr>
</table>
BobS
https://wiki.uniformserver.com/index.php?title=Coral:_cron_portable_design&diff=6195&oldid=prev
Ric: Created page with "<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font..."
2011-11-12T13:46:51Z
<p>Created page with "<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font..."</p>
<p><b>New page</b></p><div><div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font-size:12px">'''''Coral'' :'''&nbsp; [[Coral: cron intro|CRON]] | [[Coral: cron configuration detail|CRON - Configuration detail]] | [[Coral: cron portable design|CRON - Portable Design]] | [[Coral: cron srvstart utility|CRON - SrvStart utility tutorial]]</span></div><br />
<br />
{|style="margin-top:5px;"<br />
|-valign="top"<br />
|<br />
<span style="margin-bottom:5px;font-size:25px;color: #31799F;">CRON - Portable Design</span><br />
<br />
Running scripts as a service is easy to implement using Rozanski's utility see the following page [[Coral: cron srvstart utility|srvStart utility tutorial]] for details.<br />
<br />
Uniform Server has this utility integrated into Coral’s control architecture allowing portable Cron to run as a service. For anyone wanting to modify or understand how it has been implemented the following describe its operation and design. <br />
<br />
<br />
__TOC__<br />
<br />
|<br />
{| cellpadding="0" cellspacing="0" style="margin-left:6px;margin-bottom:5px;padding-left:6px;padding-right:6px;font-size:11px;background-color: #FFFFEB;border: 1px solid darkslateblue;"<br />
|-<br />
|colspan="2" style="font-weight:bold;"| UniServer&nbsp;8-Coral<br />
|-<br />
|&nbsp;||[[Coral: Introduction|Home]]<br />
|-<br />
|&nbsp;||[[Coral: start quick start|Quick Start]]<br />
|-<br />
|&nbsp;||[[Coral: general intro|General]]<br />
|-<br />
|&nbsp;||[[Coral: apache intro|Apache]]<br />
|-<br />
|&nbsp;||[[Coral: mysql intro|MySQL]]<br />
|-<br />
|&nbsp;||[[Coral: php intro|PHP]]<br />
|-<br />
|&nbsp;||[[Coral: msmtp intro|MSMTP]]<br />
|-<br />
|<span style="font-size: 14px;">»</span>||[[Coral: cron intro|CRON]]<br />
|-<br />
|&nbsp;||[[Coral: dtdns intro|DtDNS]]<br />
|-<br />
|&nbsp;||[[Coral: dbbackup intro|Db Backup]]<br />
|-<br />
|&nbsp;||[[Coral: perl intro|Perl]]<br />
|-<br />
|&nbsp;||[[Coral: index main|Main Index]]<br />
|}<br />
<br />
|}<br />
<br />
==Portable Cron==<br />
Portable Cron consists of an infinite program loop. It periodically checks an external file to determine when to exit. This concept is important when running the script as a service. <br />
<br />
==Service files==<br />
Cron service files are contained in folder UniServer\uni_con\'''cron_service''' and perform the following function:<br />
<br />
'''Utility program files''':<br />
<br />
* logger.dll - Service utility<br />
* srvstart.dll - Service utility program functions<br />
* srvstart.exe - Service utility program<br />
* srvstart.ini - Service utility configuration file<br />
<br />
'''Individual service control''':<br />
<br />
* z_install.bat - Install a named service<br />
** start_automatic.vbs - Starts service and changes service run status to Automatic<br />
* z_service_start.bat - Starts service independently of changing run status.<br />
* z_service_stop.bat - Stop service<br />
* z_uninstall_service.bat - Remove service<br />
<br />
'''Combined service control''':<br />
<br />
* install_start_service.bat - Uses the above to install and start cron service<br />
* stop_uninstall_service.bat - Uses the above to stop and remove service.<br />
<br />
Following provides details for each control file.<br />
<br />
'''''[[#top | Top]]'''''<br />
==File description and function==<br />
For clarity only pertinent information is included (files title block has been removed)<br />
<br />
===srvstart.ini===<br />
This file allows you to specify any number of services to run. Each service is specified in a block starting with a unique name enclosed in square brackets. Uniform Server Cron requires a single block as shown below:<br />
<br />
<br />
{|<br />
|-<br />
|<br />
<pre><br />
[US_CronS1]<br />
startup=C:\UniServer\uni_con\cron\start_cron.bat<br />
startup_dir=C:\UniServer\uni_con\cron<br />
shutdown=C:\UniServer\uni_con\cron\stop_cron.bat<br />
auto_restart=y<br />
restart_interval=30<br />
</pre><br />
|<br />
* '''[US_CronS1]''' specifies a unique service name '''US_CronS1''' When running multi-servers digit is incremented to retain uniquness.<br />
* '''startup''' Full path to the script to run. Service can run only .exe, .com or .bat files hence start_cron.bat This in turn runs run_cron.vbs (portable cron)<br />
* '''startup_dir''' Initially look in this folder for the file to run<br />
* '''auto_restart''' If portable Cron fails attempt to restart it after a delay of 30 seconds.<br />
* '''restart_interval''' Define restart delay time, attempt to re-start script every 30 seconds<br />
|}<br />
'''shutdown'''<br />
When the service control manger (SCM) receives a '''net stop''' message it runs the script (stop_cron.bat) defined by '''shutdown'''.<br />
<br />
<br />
Script '''stop_cron.bat''' runs script '''stop_cron.vbs''' which sets cron status to '''stop''' in configuration file '''config_tracker.ini''' this signals portable Cron to stop. The batch file '''start_cron.bat''' then closes informing SCM service has stopped.<br />
<br />
===z_install.bat===<br />
The service utility installs a named service (US_CronS1) using the '''install''' command. It uses a configuration "'''-c'''" file defined with an absolute path to prevent any ambiguity. Configuration file used is srvstart.ini<br />
<br />
<pre><br />
rem ### working directory current folder <br />
pushd %~dp0<br />
srvstart.exe install US_CronS1 -c C:\UniServer\uni_con\cron_service\srvstart.ini<br />
: pause<br />
<br />
rem ### restore original working directory<br />
popd<br />
</pre><br />
<br />
'''Note 1:''' The above installs the service as a manual service. After re-starting your PC you must manually start the service next script changes service state to automatic.<br />
<br />
'''Note 2:'''<br />
<br />
* pushd %~dp0 - Saves current working directory and change working directory to batch file location.<br />
* popd - Restores original working directory<br />
<br />
This allows a batch file to be run from any location without worrying about current working directory<br />
<br />
'''Note 3:''' The pause command is used to pause a batch file. It allows any errors to be seen, waits for a user to press any key.<br />
It is used only for testing hence is disabled by commenting it out using a colon ":"<br />
<br />
<br />
===start_automatic.vbs===<br />
The service utility installs a service as a manual service this state requires changing to automatic allowing the service script to run when the PC is restarted. The following script starts the service and changes state to automatic.<br />
<br />
{|<br />
|-<br />
|<br />
<pre><br />
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") <br />
<br />
Set colRunningServices = objWMIService.ExecQuery ("Select * from Win32_Service")<br />
For Each objService in colRunningServices<br />
If objService.DisplayName = "US_CronS1" Then<br />
'If objService.State = "Running" Then<br />
' MsgBox "Is Running"<br />
'End If<br />
If objService.State= "Stopped" Then<br />
errReturn = objService.StartService() 'Start service<br />
errReturn = objService.Change( , , , , "Automatic") 'Change state<br />
End If<br />
End If<br />
Next<br />
</pre><br />
|<br />
Create a Windows Management Instrumentation (WMI)object.<br />
<br />
<br />
Executes a query on the win32 service object<br />
<br />
<br />
Checks for named service running. Starts it if not running.<br />
<br />
<br />
Changes service state to Automatic <br />
|}<br />
The above script is run after installing a service.<br />
<br />
===z_service_start.bat===<br />
This script is provided for testing. It starts a service that has been installed with a manual status.<br />
<br />
{|<br />
|-<br />
|<br />
<pre><br />
rem ### working directory current folder <br />
pushd %~dp0<br />
net start US_CronS1<br />
:pause<br />
rem ### restore original working directory<br />
popd<br />
</pre><br />
|<br />
The script uses the standard '''net start''' command to start a named (US_CronS1) service.<br />
|}<br />
<br />
===z_service_stop.bat===<br />
This script stops a named service.<br />
<br />
{|<br />
|-<br />
|<br />
<pre><br />
rem ### working directory current folder <br />
pushd %~dp0<br />
net stop US_CronS1<br />
:pause<br />
rem ### restore original working directory<br />
popd<br />
</pre><br />
|<br />
The script uses the standard '''net stop''' command to stop a named (US_CronS1) service.<br />
|}<br />
<br />
===z_uninstall_service.bat===<br />
The service utility uninstalls a named service (US_CronS1) using the uninstall command. <br />
<br />
{|<br />
|-<br />
|<br />
<pre><br />
rem ### working directory current folder <br />
pushd %~dp0<br />
srvstart.exe remove US_CronS1<br />
:pause<br />
rem ### restore original working directory<br />
popd<br />
</pre><br />
|<br />
To use this script service must first be stopped.<br />
|}<br />
<br />
<br />
===install_start_service.bat===<br />
This script combines above scripts (z_install.bat and start_automatic.vbs) into a single script, which is used by Coral’s control interface.<br />
<br />
{|<br />
|-<br />
|<br />
<pre><br />
rem ### working directory current folder <br />
pushd %~dp0<br />
:Install srvice<br />
call z_install.bat<br />
:Change to automatic and start service<br />
call start_automatic.vbs<br />
: pause<br />
rem ### restore original working directory<br />
popd<br />
</pre><br />
|<br />
'''Call''' Runs and waits for a script to complete before continuing<br />
|}<br />
<br />
===stop_uninstall_service.bat===<br />
This script combines above scripts (z_service_stop.bat and z_uninstall_service.bat) into a single script, which is used by Coral’s control interface.<br />
<br />
<pre><br />
rem ### working directory current folder <br />
pushd %~dp0<br />
:Stop service<br />
call z_service_stop.bat<br />
:Uninstall service<br />
call z_uninstall_service.bat<br />
: pause<br />
rem ### restore original working directory<br />
popd<br />
</pre><br />
<br />
'''''[[#top | Top]]'''''<br />
<br />
==Server relocation==<br />
Relocating the servers all absolute paths are re-written the following files are changed accordingly:<br />
<br />
* srvstart.ini<br />
* z_install.bat<br />
<br />
==Multi-Servers==<br />
Running multi-servers requires unique service names hence these files are changed accordingly:<br />
<br />
* srvstart.ini<br />
* z_install.bat<br />
* start_automatic.vbs<br />
* z_service_start.bat<br />
* z_service_stop.bat<br />
* z_uninstall_service.bat<br />
<br />
<br />
'''''[[#top | Top]]'''''<br />
==Where to next==<br />
<br />
[[Coral: cron srvstart utility|CRON - SrvStart utility tutorial]]<br />
<br />
'''''[[#top | Top]]'''''<br />
<br />
----<br />
<br />
[[Category: Uniform Server 8-Coral]]</div>
Ric