ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 6 replies, has 3 voices, and was last updated by  manhapt 3 years ago.

  • Creator
    Topic
  • #5693

    manhapt
    Participant

    Hi Oro,

    I have my command: mysite:test:update

    It is not ran through when running the command:
    /usr/bin/php /path-to-project/app/console –env=prod oro:cron

    I’m trying to setup the cron job.
    I can run it directly by command mysite:test:update
    but i don’t want to register it as a separate job. I want it is also ran through when oro:cron running.

    How do i do?

    Manh from Balance Internet.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #5696

    Sergey
    Oro Core

    Hi, @manhapt!

    Your command should implement Oro\Bundle\CronBundle\Command\CronCommandInterface interface and it should be in oro:cron: namespace.

    Check docs here https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/CronBundle/README.md

    #5711

    manhapt
    Participant

    Hi Sergey,

    Do you have another way to do it without rename my command to start with oro:cron: ?

    #5731
    Dima Soroka
    Dima Soroka
    Oro Core

    Hi Manh

    Another way is to add your command to crontab explicitly.

    #5742

    manhapt
    Participant

    Hi Dima,

    Can i create another command and then register it as oro:cron: and then call my command from it?

    #5790
    Dima Soroka
    Dima Soroka
    Oro Core

    Yes, you can do this as well, the only downside will be two commands with the same function.

    #5971

    manhapt
    Participant

    Do you know how to do it? or any example about that?

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.