nativeInstallermautic

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 Mac OS X) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). Learn more.

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

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

Windows

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/bin/php installdir/apps/mautic/htdocs/app/console mautic:segments:update --env=prod /ru "System"
    $ schtasks /create /sc hourly /st 00:20 /tn mauticCronJob02 /tr installdir/php/bin/php installdir/apps/mautic/htdocs/app/console mautic:campaigns:update --env=prod /ru "System"
    $ schtasks /create /sc hourly /st 00:25 /tn mauticCronJob03 /tr installdir/php/bin/php installdir/apps/mautic/htdocs/app/console mautic:campaigns:trigger --env=prod /ru "System"
    $ schtasks /create /sc hourly /st 00:35 /tn mauticCronJob04 /tr installdir/php/bin/php installdir/apps/mautic/htdocs/app/console mautic:emails:send --env=prod /ru "System"
    $ schtasks /create /sc hourly /st 00:45 /tn mauticCronJob05 /tr installdir/php/bin/php installdir/apps/mautic/htdocs/app/console mautic:webhooks:process --env=prod /ru "System"
    

The jobs will be executed once every hour.

Last modification September 3, 2018