OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Cron job not added to table `oro_message_queue_job` and Job List

This topic contains 4 replies, has 2 voices, and was last updated by  kiatsiong.ng 8 months, 3 weeks ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #38489

    kiatsiong.ng
    Participant

    I can see the cron schedule is loaded with oro:cron:definitions:load. However, it doesn’t get added to the Job List (table oro_message_queue_job).

    This is the command class:

    I can run the command in CLI:

    What did I miss?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #38491

    kiatsiong.ng
    Participant

    In var/logs/prod.log:

    [2019-04-09 06:36:02] console.ERROR: An error occurred while running command “‘oro:cron’ –env=prod”. The command “oro:cron:sc-logger-event:insert-action-data” does not exist. {“exit_code”:1,”exception”:”[object] (Symfony\\Component\\Console\\Exception\\CommandNotFoundException(code: 0): The command \”oro:cron:sc-logger-event:insert-action-data\” does not exist. at /usr/share/nginx/html/misoro/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:484)”,”arguments”:{“command”:”oro:cron”},”options”:{“env”:”prod”}} []
    [2019-04-09 06:36:02] console.ERROR: Error thrown while running command “oro:cron –env=prod”. Message: “The command “oro:cron:sc-logger-event:insert-action-data” does not exist.” {“exception”:”[object] (Symfony\\Component\\Console\\Exception\\CommandNotFoundException(code: 0): The command \”oro:cron:sc-logger-event:insert-action-data\” does not exist. at /usr/share/nginx/html/misoro/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:484)”,”command”:”oro:cron –env=prod”,”message”:”The command \”oro:cron:sc-logger-event:insert-action-data\” does not exist.”} []

    #38492

    kiatsiong.ng
    Participant

    It turns out that I needed to clear cache at prod:

    #41192

    saikatcdac
    Participant

    Hi Kiatsiong.ng

    I am new in Oro and i was trying to create a demo cron job but unable to do that. So if possible will you help me to understand to create a simple Oro cron in my local system. I am using Ubuntu 18 and Oro CRM version latest one. I have created a folder under src directory as like same you have mentioned in your code. Then what should i do? Or how can i create a simple cron job where after running the cron the hello world string will be printed on screen or something like that. Actually i am not getting the cron things how it’s work in Oro.

    Thanks
    Saikat

    #41205

    kiatsiong.ng
    Participant

    Here’s my notes on setting up cron job and creating a cron job in Oro Platform.

    • This reply was modified 8 months, 3 weeks ago by  kiatsiong.ng.
    • This reply was modified 8 months, 3 weeks ago by  kiatsiong.ng.
    • This reply was modified 8 months, 3 weeks ago by  kiatsiong.ng.
Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No