'min' => 0,
'max' => 0,
),
+ 'generate' => array(
+ 'desc' => 'Generate notifications for a table, eg. cash_invoice',
+ 'default' => '',
+ 'short' => 'g',
+ 'min' => 0,
+ 'max' => 1,
+ ),
);
var $target = 'Core/NotifySend';
var $evtype = ''; // any notification...
// this script should only handle EMAIL notifications..
-
+ var $force = false;
function getAuth()
{
$ff = HTML_FlexyFramework::get();
if (is_a($w, 'DB_DataObject')) {
$w->generateNotifications();
}
-
+ if (!empty($opts['generate'])) {
+ $w = DB_DataObject::factory($opts['generate']);
+ if (is_a($w, 'DB_DataObject')) {
+ $w->generateNotifications();
+ }
+ exit;
+
+
+ }
//DB_DataObject::debugLevel(1);
$w = DB_DataObject::factory($this->table);
if (!empty($this->send_to)) {
$app .= ' --sent-to='.escapeshellarg($this->send_to);
}
- $cmd = $php . ' ' . $app . ' ' . $cmdOpts; //. ' &';
+ $cmd = 'exec ' . $php . ' ' . $app . ' ' . $cmdOpts; //. ' &';
$pipe = array();
// update if necessday.
if ($info['pid']) {
+ echo "CHANING PID FROM " . $p['pid'] . " TO ". $info['pid']. "\n";
$p['pid'] = $info['pid'];
}
- echo @file_get_contents('/proc/'. $p['pid'] .'/cmdline');
+ echo @file_get_contents('/proc/'. $p['pid'] .'/cmdline') . "\n";
if ($info['running']) {
return false;
}
+
function output()
{
- die("done\n");
+ die("Done\n");
}
-
}
\ No newline at end of file