Permalink
Browse files

Small changes for cron jobs

  • Loading branch information...
yurabakhtin committed May 2, 2018
1 parent d850bef commit 32403e02e61012c730c71bc8cbc90f8c442c9768
Showing with 3 additions and 9 deletions.
  1. +0 −5 cron/cron_exec.php
  2. +2 −2 inc/cron/_cron.funcs.php
  3. +1 −2 inc/cron/views/_cronjob.view.php
View
@@ -257,11 +257,6 @@
$timestop = time() + $time_difference;
}
if( $result_status == 'finished' && $timestop - $cron_timestart > 60 )
{ // Record a finished task as warning if it has run for more than 60 seconds
$result_status = 'warning';
}
if( is_array( $result_message ) )
{ // If result is array we should store it as serialized data
$result_message = serialize( $result_message );
View
@@ -157,10 +157,10 @@ function get_cron_log_time( $action_num = NULL )
{
global $Timer;
return '<p class="note">'
return '<div class="note">'
.( $action_num === NULL ? '' : 'Action #'.$action_num.' Finished. ' )
.'Elapsed time since beginning of task: '.$Timer->get_duration( 'cron_exec' ).' seconds'
.'</p>';
.'</div>';
}
@@ -49,9 +49,8 @@
else
{
$duration_seconds = strtotime( $cjob_row->clog_realstop_datetime ) - strtotime( $cjob_row->clog_realstart_datetime );
$duration_icon = ( $duration_seconds > 60 ) ? ' '.get_icon( 'warning_yellow', 'imgtag', array( 'title' => T_('This job took more than 60 seconds to execute!') ) ) : '';
$Form->info( T_('Status'), '<span style="background-color:'.cron_status_color ( $cjob_row->clog_status ).';padding:0 5px;">'.$cjob_row->clog_status.'</span>'.$duration_icon );
$Form->info( T_('Status'), '<span style="background-color:'.cron_status_color ( $cjob_row->clog_status ).';padding:0 5px;">'.$cjob_row->clog_status.'</span>' );
$Form->info( T_('Real start time'), mysql2localedatetime( $cjob_row->clog_realstart_datetime ) );
$Form->info( T_('Real stop time'), mysql2localedatetime( $cjob_row->clog_realstop_datetime ) );
$Form->info( T_('Duration'), seconds_to_period( $duration_seconds ) );

0 comments on commit 32403e0

Please sign in to comment.