$loader->addResourceType('model', 'models', 'Model');
// Get our config file
$config = new Zend_Config_Ini($apppath . '/application/configs/application.ini');
Zend_Registry::set('config', $config->production);
// Because our models need it this way
// Get the messages model
// Set up our current timestamp
$timestamp = date('Y-m-d H:i:s');
// Log the start of this read
logWrite("####################################");
logWrite("Begin update: {$timestamp}");
logWrite("------------------------------------");
// Log our counts
//logWrite("")
$dataObj = new Application_Model_DataReporting();
$rst = $dataObj->recipients_update();
if ($rst) {
    $log = "Messages updated: {$rst}";
    logWrite($log);
} else {
    logWrite("No messages updated");
}
// Set up our current timestamp for closing out
$timestamp = date('Y-m-d H:i:s');
// Log the end of this send
logWrite("\n---------------------");
logWrite("Process complete\nEnd update: {$timestamp}");
logWrite("####################################\n");
return 0;
/**
 * Simply writes a log message line to the log file