for my $event ( @{ $c->_events } ) {
my $next_run;
- if ( $event->{trigger}
+ if ( $event->{trigger} && $c->req->params->{schedule_trigger}
&& $event->{trigger} eq $c->req->params->{schedule_trigger} )
{
= $c->_event_state->{events}->{ $event->{event} }->{last_run};
if ( $last_run ) {
$last_run = DateTime->from_epoch(
- epoch => $last_run,
+ epoch => $last_run,
time_zone => $conf->{time_zone},
);
$dump->{last_run}
if ( $mtime > $c->_event_state->{yaml_mtime}->{$$} ) {
$c->_event_state->{yaml_mtime}->{$$} = $mtime;
- # clean up old PID files listed in yaml_mtime
+ # clean up old PIDs listed in yaml_mtime
foreach my $pid ( keys %{ $c->_event_state->{yaml_mtime} } ) {
if ( $c->_event_state->{yaml_mtime}->{$pid} < $mtime ) {
delete $c->_event_state->{yaml_mtime}->{$pid};