Some cleanup, setup improvements and other misc items
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Admin TASK management
|
||||
* This class provides TASK management
|
||||
*
|
||||
* @package Task
|
||||
* @category Controllers
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* List all Active Tasks defined in the DB
|
||||
* List all Tasks defined in the DB
|
||||
*
|
||||
* @package Task
|
||||
* @category Tasks
|
||||
@@ -9,15 +9,24 @@
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Task_Task_Listactive extends Minion_Task {
|
||||
class Task_Task_List extends Minion_Task {
|
||||
protected $_options = array(
|
||||
'active'=>0, // Show only active services
|
||||
);
|
||||
|
||||
protected function _execute(array $params) {
|
||||
$header = "%2s %30s %21s %21s %40s\n";
|
||||
$header = "%2s %1s %30s %21s %21s %40s\n";
|
||||
|
||||
$output = sprintf($header,'ID','Command','Last Run','Next Run','Description');
|
||||
$output = sprintf($header,'ID','?','Command','Last Run','Next Run','Description');
|
||||
|
||||
foreach (ORM::factory('Task')->list_active() as $to)
|
||||
$t = ORM::factory('Task');
|
||||
if ($params['active'])
|
||||
$t->where_active();
|
||||
|
||||
foreach ($t->find_all() as $to)
|
||||
$output .= sprintf($header,
|
||||
$to->id,
|
||||
$to->status ? 'A' : 'I',
|
||||
$to->command,
|
||||
$to->display('date_run'),
|
||||
$to->next_run(TRUE),
|
Reference in New Issue
Block a user