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.
In order to install the cron task for CiviCRM, follow the steps below:.
-
Run the following command to open the crontab file:
$ sudo crontab -u root -e
-
At the end of the file, add the following line. Replace DOMAIN.COM with the domain name of your server.
*/1 * * * * su daemon -s /bin/sh -c ". installdir/scripts/setenv.sh; installdir/apps/civicrm/drush/drush -u 1 -r installdir/apps/civicrm/htdocs -l DOMAIN.COM civicrm-api job.execute auth=0 -y"
-
Save the file and exit.
This cron entry will run the command every 1 minute.