Concrete:scheduler - Cron Jobs Failing with Error on AWS

I have a site in Elastic Beanstalk and everything is running fine apart from Cron scheduling.

I’ve followed the instructions here on how to setup the cron tasks, however when running it returns the following:

 There are no commands defined in the "concrete:scheduler" namespace. 

Here is my cron config:

files:
    "/etc/cron.d/mycron":
        mode: "000644"
        owner: root
        group: root
        content: |
            * * * * * root /usr/local/bin/c5-scheduler.sh

    "/usr/local/bin/c5-scheduler.sh":
        mode: "000755"
        owner: root
        group: root
        content: |
            #!/usr/bin/env bash

            PHP=`which php`

            $PHP /var/www/html/concrete/bin/concrete concrete:scheduler:run

commands:
    remove_old_cron:
        command: "rm -f /etc/cron.d/mycron.bak"

Any help would be appreciated.

Thanks

In addition to this, I’ve just run concrete/bin/concrete list on both my dev and production environments.

On dev I have the following command groups:

c5
concrete
dbal
messenger
migrations
orm
task

On production:

c5

Is there a config setting I need to update for my production environment that will set the correct locations for the other command groups?

Thanks

Hi @lgtlee - strange that they’re available on your dev environment and not your prod environment - do you have the same version of Concrete CMS installed in both places?

Hi Evan - it is exactly the same version. In fact it’s exactly the same code. I have suspicion it’s down to the production environment not being able to detect the DIR_BASE path correctly.

If I run c5:is-installed on both environments development shows as installed and production shows not installed.

I’ve been looking if there is a way to manually define the DIR_BASE somewhere but can’t seem to find it.

hmm - I wonder if you need to run composer install or composer update in production or something (you might create an intermediary environment to test that out before you run it on production) - seems like there’s some stuff missing.

But yeah otherwise not too sure…