nativeInstallerorocrm

Configure scheduled tasks

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

Cron jobs allow OroCRM to execute tasks that should be executed at fixed times (for example, sending email to customers or generating reports). Usually, these tasks wouldn’t be performed by visiting a particular URL using your browser. Instead, you’ll configure your operating system to execute some script which performs the desired tasks.

Approach A: Bitnami installations using system packages

Cron jobs are enabled by default. To edit them, follow these steps:

  • Run the following command to edit the crontab file:

      $ sudo nano /etc/cron.d/orocrm
    
  • Add the following lines to the file. The jobs will be executed at the first minute of every hour. You can modify the timing if you wish:

      */1 * * * * daemon cd installdir/orocrm && installdir/php/bin/php bin/console oro:cron --env=prod >> /dev/null 2>&1
    
  • Save the file.

Approach B: Self-contained Bitnami installations

Follow these steps:

  • Run the following command to edit the crontab file:

      $ sudo crontab -e
    
  • Add the following lines to the file. The jobs will be executed at the first minute of every hour. You can modify the timing if you wish:

      *1/ * * * * installdir/php/bin/php installdir/apps/orocrm/htdocs/bin/console oro:cron --env prod >> /dev/null
    
  • Save the file.

Last modification June 16, 2021