PHP3 Guide
<Client>:<Data1>;<Client>:<Data2>;.
These patterns are read from /tmp/utasksocket. By default, if an event is trigged, the
program runs, exits and starts again as long as the triggering event is valid.
utask start at most five (5) child-processes. When the maximum number of child
processes has been exceeded, utask has to decide how to proceed. utask usually kills
the process with the lowest priority (if the pending task has a higher priority than this
process). The entries in the configuration file (task.list) are ordered by growing
priority, i.e. later entries precede earlier entries.
'once'
Specifying 'once' tells utask to skip starting the program as long as the event has not
been invalidated. utask checks for events ten times every second (if not in stand-by
mode). Thus, if an event is specified to run at a certain point in time, say 'time(h(0)
m(0) s(0) )', then this would run the program up to ten times since the event is active
during a whole second.
'immune'
utask also provides the user with the possibility of protecting child processes to be
prematurely killed by using the 'immune' tag in the script entry. An 'immune' script
will always run until it terminates.
3.3.3.2 Examples
Here is an example of a task.list.
The first two entries uses PHP3 to execute scripts mentioned later in this document.
# FTP transfer once every 15 minutes uninterrupted.
time(m(0,15,30,45)) immune once % /bin/php : ./ftp.php;
# Mail the current syslog once every day.
time( h(0) m(0) s(0) ) once % /bin/php : ./mail_syslog.php;
# Sends and alert message every time I1 and I2 are high at the same time...
pattern((IO1:H)(IO2:H)) once % alert : "Input 1 and 2 detected";
3.3.4 Put a new or changed script inside the Video Server:
If a new script is created or something has been modified in the script that the wizard
has created, then the new file must be uploaded into the Video Server. To do this
follow the instructions below:
Note: When writing the scripts use for example Notepad.
Axis Communications AB does not provide support for application development of any kind. The
information here is provided "as is", and there is no guarantee that any of the examples shown
will work in your particular application.
Revision 0.91 June 2001
14
Need help?
Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?
Questions and answers