How to fix «There are no commands defined in the "setup:cron" namespace» on`bin/magento setup:cron:run` in Magento ≥ 2.3.7?

2023-07-21--19-46-14

The bin/magento setup:cron:run command and the update/cron.php script have been removed from Magento ≥ 2.3.7
So you need to remove the bin/magento setup:cron:run command call and the update/cron.php script call from your Cron schedule.