Changes

Jump to navigation Jump to search

Cron Design: Introduction

166 bytes removed, 02:05, 13 February 2010
Proofreading and grammatical changes
{{Nav Cron Design}}
Portable Cron was integrated into Uniform Server 5-Nano although . Although useful , it suffered from a number of limitations. A new design has addressed these issues and offers more flexibility.
That said , you may find it does not meet your particular requirements . The best solution is to design new scripts or modify the existing ones.
The following provides a detailed description of the current implementation, which you can use as a basis for new designs or tweak the exiting existing scripts.
== Background ==
Before looking at configuration the following provides a , this is quick overview what portable Cron is and what it is not.
=== Cron ===
Cron originated from a Unix environment it . It is a job scheduler allowing that allows scripts to be run automatically at a certain time or date.
Cron (chronograph) has become a more general term referring to a periodic tick.
'''''[[#top | Top]]'''''
=== Portable Cron ===
Why portable Cron? A For a permanent installation of UniServer running as a service , you can set-up Windows to schedule a task similar to Unix Cron check . Check out [http://support.microsoft.com/kb/308569 How To Schedule Tasks in Windows XP] for details?
This is not practical when running UniServer from a USB memory stick , which implies portability . It means you need to reconfigure each new machine. UniServer 5.0-Nano resolves this with a small script scheduler referred to as portable Cron.
It’s fully integrated into UniServers’s control architecture , allowing it to be run from either batch files or UniTray.
'''''[[#top | Top]]'''''
== Configuration ==
To understand the design , it’s worth first looking at configuration. Knowing how to configure Cron also serves as a specification.
To run each individual script , a number of parameters are set in a configuration file : '''cron.ini''' . This file has a standard format making it very easy to use and set up and use.
Each script to be run is defined in a self-contained block. Each block starts with a unique header see following . Here's an example:
<pre>
[moodle]
ref =
</pre>
'''''[[#top | Top]]'''''
=== Explanation ===
{|
|'''ref''' ||- A tracker set by Cron script effectively time to next run. Deleting this value allows a new start time to be set (covered later)
|}
'''''[[#top | Top]]'''''
=== Detail ===
{|
'''''Note 1'':''' Cron automatically updates ref with the initial start time set and<br />
period. Every time a script is run , the value is updated with a new Cron reference.<br />this This defines when the next run is to start.
'''''Note 2'':''' To specify a new start time first set a new value for start and<br />
delete the ref number (if there is one), then save the file. The script will run at the<br />date and time set and thereafter at a period you defined .
|}
'''''[[#top | Top]]'''''
== General notes ==
Configuration file location: UniServer\unicon\main\'''cron.ini'''
* <nowiki>http:</nowiki>//localhost:81/drupal/cron.php
'''''[[#top | Top]]'''''
== How to run portable Cron ==
* To stop Cron: Double click on Stop_Cron.bat
'''''[[#top | Top]]'''''
=== Automatic ===
"%PHP%\php.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 7";ShowCmd: hidden; Glyph: 11
</pre>
'''''[[#top | Top]]'''''
== Logging ==

Navigation menu