schedule-bundle icon indicating copy to clipboard operation
schedule-bundle copied to clipboard

Commands not running automaticallty

Open Karim-Mannai opened this issue 3 years ago • 3 comments

I have a command scheduled to run every minute, when I type php bin/console schedule:list --detail I can see next run in 1 mn. But it doesn't run autimarically until I type php bin/console schedule:run Any ideas how to make it run automatically ? Thanks

Karim-Mannai avatar Mar 21 '21 11:03 Karim-Mannai

Hello, you need to setup your production server to run the schedule:run command every minute (cron job).

kbond avatar Mar 21 '21 16:03 kbond

I'm using Symfony 4.4 and still in dev mode (Windows OP). here's the eror I got when I setup the symfony.cloud.yaml

In Parser.php line 720:

Reference " * * * *" does not exist at line 1 (near "spec: * * * * *").

Karim-Mannai avatar Mar 22 '21 14:03 Karim-Mannai

Oh, you're using Symfony Cloud? I've never actually tested or seen it being used with this bundle in the wild so this will be a learning experience.

I'm seeing my docs linked above are outdated/incorrect. What about:

crons:
    zenstruck_schedule:
        # every minute
        spec: * * * * *
        cmd: croncape bin/console schedule:run

kbond avatar Mar 22 '21 14:03 kbond