TASK-290 Add new new command for Auth Sources Cron

This commit is contained in:
Brayan Pereyra
2025-10-07 02:22:03 +00:00
parent 6dffc6100e
commit 0b0a176058
10 changed files with 1789 additions and 56 deletions

View File

@@ -103,6 +103,7 @@ class CLI
public static function help ($args, $opts = null)
{
global $argv;
$scriptName = $argv[0];
if (is_array($args) && count($args) > 0 ) {
$taskName = $args[0];
@@ -202,10 +203,12 @@ EOT;
CLI::taskName( "help" );
CLI::taskRun( array ('self','help'
) );
global $argv;
$args = $argv;
$cliname = array_shift( $args );
$taskName = array_shift( $args );
if (isset($taskName[0])) {
while ($taskName[0] == '-') {
$taskName = array_shift( $args );
@@ -345,7 +348,7 @@ EOT;
* @param string $message the message to display
* @param string $filename the log file to write messages
*/
public static function logging ($message, $filename = null)
public static function logging($message, $filename = null, $color = null)
{
static $log_file = null;
if (isset( $filename )) {
@@ -355,7 +358,7 @@ EOT;
if (isset( $log_file )) {
fwrite( $log_file, $message );
}
echo $message;
eprintln($message, $color);
}
}
}