[Fix](Job)Fix One-Time type JOB parameter verification error (#30779)

This commit is contained in:
Calvin Kirs
2024-02-03 15:10:41 +08:00
committed by yiguolei
parent 0c7c8240ee
commit a3a73162e5
3 changed files with 21 additions and 4 deletions

View File

@ -92,6 +92,9 @@ public class JobExecutionConfiguration {
if (timerDefinition.getStartTimeMs() == null) {
throw new IllegalArgumentException("startTimeMs cannot be null");
}
if (isImmediate()) {
return;
}
if (timerDefinition.getStartTimeMs() < System.currentTimeMillis()) {
throw new IllegalArgumentException("startTimeMs cannot be less than current time");
}