Scheduled tasks allow to perform various tasks in background and usually are executed from CRON. During scheduled task development it's often needed to execute single scheduled task and there is "Run" button on "Scheduled Tasks" section that allows to do that.
Unfortunately that "Run" button executes scheduled task in "Admin Console context" and using currently logged-in user ID. In real life (from CRON) scheduled tasks are executed in "Front-End context" and using "root" user. Such inconsistency ends up in developer thinking that scheduled task is working (when executed in Admin Console), but in fact it's not working (when executed from CRON).
To remove that inconsistency I propose to create "in-portal scheduled-task:run" command that will:
execute given scheduled task, when it's name is given:
execute all scheduled tasks, when name isn't given:
Then this command can be called from
tools/cron.php script as well to avoid it being used from Web context.