Fixed module_crontab in first execution in Linux
Former-commit-id: f4d37d7103f8d2ecfc00fd43360e8a58a31f775a
This commit is contained in:
parent
c9ac5d9313
commit
5de2bb3eff
|
@ -2397,6 +2397,7 @@ sub check_module_cron {
|
|||
$interval
|
||||
);
|
||||
|
||||
my $is_first = ($module->{'cron_utimestamp'} == 0) ? 1 :
|
||||
$module->{'cron_utimestamp'} = $now + $time_to_next_execution;
|
||||
$module->{'cron_interval'} = $time_to_next_execution;
|
||||
|
||||
|
@ -2405,7 +2406,7 @@ sub check_module_cron {
|
|||
}
|
||||
|
||||
# On first execution checking if cron is valid is required
|
||||
return 1 unless ($module->{'cron_utimestamp'} == 0);
|
||||
return 1 unless ($is_first);
|
||||
|
||||
# Check if current timestamp is a valid cron date
|
||||
my $next_execution = cron_next_execution_date(
|
||||
|
|
Loading…
Reference in New Issue