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 9 years, 7 months ago.

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

  • Creator
    Topic
  • #28126

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

    Sergey
    Participant

    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

    #28128

    manhapt
    Participant

    Hi Sergey,

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

    #28129

    Dima Soroka
    Keymaster

    Hi Manh

    Another way is to add your command to crontab explicitly.

    #28130

    manhapt
    Participant

    Hi Dima,

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

    #28131

    Dima Soroka
    Keymaster

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

    #28132

    manhapt
    Participant

    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.

Back to top