Skip to content
Snippets Groups Projects
Commit 8258b32a authored by Jared Hancock's avatar Jared Hancock
Browse files

cli: Add beginnings of endpoints for cron items

parent e9c99e7f
No related branches found
No related tags found
No related merge requests found
<?php
require_once dirname(__file__) . "/class.module.php";
require_once dirname(__file__) . "/../cli.inc.php";
class CronManager extends Module {
var $prologue = 'CLI cron manager for osTicket';
var $arguments = array(
'action' => array(
'help' => 'Action to be performed',
'options' => array(
'fetch' => 'Fetch email',
'search' => 'Build search index'
),
),
);
function run($args, $options) {
Bootstrap::connect();
$ost = osTicket::start();
switch (strtolower($args[0])) {
case 'fetch':
Cron::MailFetcher();
break;
case 'search':
$ost->searcher->backend->IndexOldStuff();
break;
}
}
}
Module::register('cron', 'CronManager');
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment