When a proxied bean has a @Scheduled annotation, that task is executed twice as if there would be two beans. As a user I would expect that a proxied bean still behaves and acts as there would be only one bean. I would expect the task to be executed only once.
If you run the example, you notice two outputs every second, while I would expect only one output per second.
This seems to run twice only when the scoped proxy is injected into another bean, not processing the scoped proxy instance itself otherwise at all. This is why it remained unnoticed in our tests. We need to consistently ignore the scoped proxy instance here, independent from the lifecycle and injection scenario.
We consistently ignore ScopedObject and AopInfrastructureBean for @Scheduled and related post-processing now. This also optimizes annotation introspection along the lines of #21472 on the 5.1 line now, whereas the backports are going to be rather minimal.
Thanks for raising this! If you get the chance, please give the upcoming 5.1.0.BUILD-SNAPSHOT or 5.0.9.BUILD-SNAPSHOT a try...