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.

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 at various times past the hour, every hour. You can modify the timing if you wish:

      15 * * * * su daemon -s /bin/sh -c "installdir/php/bin/php installdir/apps/mautic/htdocs/bin/console mautic:segments:update --env=prod"
      20 * * * * su daemon -s /bin/sh -c "installdir/php/bin/php installdir/apps/mautic/htdocs/bin/console mautic:campaigns:update --env=prod"
      25 * * * * su daemon -s /bin/sh -c "installdir/php/bin/php installdir/apps/mautic/htdocs/bin/console mautic:campaigns:trigger --env=prod"
      35 * * * * su daemon -s /bin/sh -c "installdir/php/bin/php installdir/apps/mautic/htdocs/bin/console mautic:emails:send --env=prod"
      45 * * * * su daemon -s /bin/sh -c "installdir/php/bin/php installdir/apps/mautic/htdocs/bin/console mautic:webhooks:process --env=prod"
  • Save the file.

The jobs will be executed at various times past the hour, every hour.


Follow these steps:

  • Launch an elevated Windows command prompt.

  • Run the following commands:

      $ schtasks /create /sc hourly /st 00:15 /tn mauticCronJob01 /tr installdir/php/php.exe installdir/apps/mautic/htdocs/bin/console mautic:segments:update --env=prod /ru "System"
      $ schtasks /create /sc hourly /st 00:20 /tn mauticCronJob02 /tr installdir/php/php.exe installdir/apps/mautic/htdocs/bin/console mautic:campaigns:update --env=prod /ru "System"
      $ schtasks /create /sc hourly /st 00:25 /tn mauticCronJob03 /tr installdir/php/php.exe installdir/apps/mautic/htdocs/bin/console mautic:campaigns:trigger --env=prod /ru "System"
      $ schtasks /create /sc hourly /st 00:35 /tn mauticCronJob04 /tr installdir/php/php.exe installdir/apps/mautic/htdocs/bin/console mautic:emails:send --env=prod /ru "System"
      $ schtasks /create /sc hourly /st 00:45 /tn mauticCronJob05 /tr installdir/php/php.exe installdir/apps/mautic/htdocs/bin/console mautic:webhooks:process --env=prod /ru "System"

The jobs will be executed once every hour.

Last modification February 11, 2021