Esempio n. 1
0
$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 batch send: {$timestamp}");
logWrite("------------------------------------");
// Get the queue and counts
// Log our counts
logWrite("Scheduled campaign");
//logWrite("")
$msg = new Application_Model_Message();
$arr = $msg->scheduledCampaignsSend();
$msg->weeklycampDirectSend($arr);
logWrite("\n---------------------");
logWrite("Scheduled: {$timestamp}");
logWrite("####################################\n");
return 0;
/**
 * Simply writes a log message line to the log file
 * 
 * @param string $msg The message to write
 */
function logWrite($msg)
{
    global $logfile;
    $fh = fopen($logfile, 'a');
    fwrite($fh, "{$msg}\n");