I have a Pimcore 11 Project.
I want to schedule Page publishing. I set the schedule in the Pimcore UI and it shows up in the database.
However the task never gets executed. I have the cronjob set up properly, but even when i run bin/console pimcore:maintenance directly nothing happens.
I put a die() in the execute method of vendor/pimcore/pimcore/lib/Maintenance/Tasks/ScheduledTasksTask.php and it seems it never gets executed.
Did i forgot something?
It is not obvious, but scheduled tasks running is split in 2 processes:
It means, that there are huge amounts of edge cases why your task is not executing, e.g. TTL too big, or task is not registered
Usually this is enough:
Remember to change 'some_task_name' to real one.
In crucial cases, you can temporarily configure __construct() method of your scheduled task to execute the task. It will allow testing. Remember to delete if before to commit.