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.

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.


Follow these steps:

On Windows, use the Control Panel to configure the Task Scheduler to do the same.

  • Go to “Start Menu -> All Programs -> Accessories -> System tools -> Task Scheduler”.

  • In the Task Scheduler window, go to the Actions column on the right. There, click “Create Basic Task” to open the “Create Basic Task Wizard”.

  • A configuration window will appear. Enter a name for the task (like “OroCRM Cron”) and a description.

  • Configure the task to run daily.

  • Select “Run a program” when the wizard shows the actions. You will be prompted to enter a program/script path (your PHP path) and some arguments.

    • Program/script: C:\installdir\php\php.exe
    • Arguments: C:\installdir\apps\orocrm\htdocs\bin\console oro:cron –env=prod

IMPORTANT: Make sure you are pointing to the correct PHP and OroCRM directories, otherwise the cron jobs will not work.

Linux and Mac OS X

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 the first minute of every hour. You can modify the timing if you wish:

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

Last modification October 1, 2019