OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions How to join oro:cron

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

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

  • Creator
  • #28126


    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
  • #28127


    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



    Hi Sergey,

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

    Dima Soroka
    Dima Soroka

    Hi Manh

    Another way is to add your command to crontab explicitly.



    Hi Dima,

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

    Dima Soroka
    Dima Soroka

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



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

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

The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.

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

Yes No