Dependency perl code

Command directory

To suggest that the DPC is responsible for the entire maintenance of a file system would be misleading and wrong, because most of the work is likely to be done through the commands that are defined in the dependency file. The job of the DPC is to recognise when these commands should be called.

Sometimes these commands are a simple unix command like, mv. But usually they'll be more complicated and involve a script. These scripts could be put almost anywhere, but it is typical to put them in the directory cgi-bin/update/commands, which here is called the commands directory.

A typical script, in the command directory, might look something like

#!/bin/ksh
#=================================================
# Marc 28 Jun 2010
# Create the categorization files by running 
# run_cloud_categorization.m
#=================================================
# Set evironment variables
#-------------------------------------------------
Site=${1}
Date=${2}
#-------------------------------------------------
# Check we have the inputs
#-------------------------------------------------
if test -z "${Date}"; then
  echo "ERROR: require 2 input variables: site and date." 
  return 1
fi
#-------------------------------------------------
# Run the matlab script
#-------------------------------------------------
/home/opt-user/Linux-opt/graphics/matlab/bin/matlab -nojvm <<SCRIPT
run_cloud_categorization_cron(${Date},'${Site}'); exit;
SCRIPT

which runs the matlab script run_cloud_categorization_cron.m. The users will have to write these scripts.

Things to do now

Contact

Page navigation