all_searches cron script Updates the PIE all resources page when run as a cron job e.g. once a day Input: none Output: none unless run in debug mode None-PIE modules used: CGI, DBI PDL - note that the loops are different even though the PDL is the same, because the type of search is different and that makes the parameters different Read config file Require PIE modules needed - error, shared and rdb utilities (last connects to resource database) Get list of resource type searches from resource_type table of resource database Get list of subject searches from subject table of resource database Connect to PIE database Delete existing searches and their results (from item table and search table) Foreach resource type Set up search title Set up search parameters (creating a faked up CGI object) Call savesearch routine Delete search parameters CGI object Foreach subject Set up search title Set up search parameters (creating a faked up CGI object) Call savesearch routine Delete search parameters CGI object Foreach letter (A-Z) Set up search title Set up search parameters (creating a faked up CGI object) Call savesearch routine Delete search parameters CGI object Foreach age (7,30) days since resource created Set up search title Set up search parameters (creating a faked up CGI object) Call savesearch routine Delete search parameters CGI object Ensure searches are readable by all Disconnect from resource database Disconnect from PIE database Exit File also contains copy of ParseXML and ReadConfig subroutines (see UIG.pdl)