This test has been failing consistently twice per month almost the same days. Probably something related to the date 
<img width="555" alt="Screenshot 2023-04-21 at 12 22 41" src="https://user-images.githubusercontent.com/284537/233612871-aa59d137-dcd1-4333-adf4-800b049691b8.png">


**Build scan:**
https://gradle-enterprise.elastic.co/s/m44bu6kvdglmg/tests/:x-pack:plugin:transform:test/org.elasticsearch.xpack.transform.transforms.scheduling.TransformSchedulerTests/testScheduleNowWithSystemClock

**Reproduction line:**
```
./gradlew ':x-pack:plugin:transform:test' --tests "org.elasticsearch.xpack.transform.transforms.scheduling.TransformSchedulerTests.testScheduleNowWithSystemClock" -Dtests.seed=51789FCA46998A02 -Dtests.locale=uk-UA -Dtests.timezone=Etc/GMT+6 -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.transform.transforms.scheduling.TransformSchedulerTests&tests.test=testScheduleNowWithSystemClock

**Failure excerpt:**
```
java.lang.AssertionError: 
Expected: a collection with size <2>
     but: 

  at __randomizedtesting.SeedInfo.seed([51789FCA46998A02:4BE1BDC054FCCE5]:0)
  at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
  at org.junit.Assert.assertThat(Assert.java:956)
  at org.junit.Assert.assertThat(Assert.java:923)
  at org.elasticsearch.xpack.transform.transforms.scheduling.TransformSchedulerTests.testScheduleNowWithSystemClock(TransformSchedulerTests.java:347)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1623)

```
x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformSchedulerTests.java
assertThat(
            transformScheduler.getTransformScheduledTasks(),
            contains(new TransformScheduledTask(transformId, frequency, 0L, 0, 5000, taskModifyingListener))
        );
        assertThat(events, hasSize(1));
        clock.advanceTimeBy(Duration.ofMillis(5000));
        transformScheduler.processScheduledTasks();
        assertThat(
            transformScheduler.getTransformScheduledTasks(),
            contains(new TransformScheduledTask(transformId, frequency, 5000L, 666, 3605000, taskModifyingListener))
        );
        assertThat(events, hasSize(2));
        assertThat(
            events,
            contains(new TransformScheduler.Event(transformId, 0, 0), new TransformScheduler.Event(transformId, 5 * 1000, 5 * 1000))
        );
    }
    public void testSchedulingWithSystemClock() throws Exception {
        String transformId = "test-with-system-clock";
        TimeValue frequency = TimeValue.timeValueSeconds(1);
        TransformTaskParams transformTaskParams = new TransformTaskParams(transformId, TransformConfigVersion.CURRENT, frequency, false);
        Clock clock = Clock.systemUTC();
        CopyOnWriteArrayList<TransformScheduler.Event> events = new CopyOnWriteArrayList<>();
        TransformScheduler transformScheduler = new TransformScheduler(clock, threadPool, SETTINGS);
        transformScheduler.start();
        transformScheduler.registerTransform(transformTaskParams, events::add);
        assertThat(events, hasSize(1));
        assertBusy(() -> assertThat(events, hasSize(greaterThanOrEqualTo(3))), 20, TimeUnit.SECONDS);
        assertThat(events, hasSize(greaterThanOrEqualTo(3)));
        assertThat(events.get(0).transformId(), is(equalTo(transformId)));