How do I run Cron Jobs on AWS EC2 (Ubuntu server)

Your software
My Mautic version is: 4.0.0
My PHP version is: 7.4.33
My Database type and version is: MariaDB

Your problem
My problem is:
I want to know how do I run Mautic CRON jobs on Amazon AWS EC2 server?
Are there any tutorials available?
Most of the tutorials available are using cPanel, but I don’t have a cPanel.


I can’t help for EC2 specific but I assume you have CLI access via terminal or putty or similar?

How to work with crons in mautic via CLI

Run the below in CLI to force a cron to run

php /var/www/mautic/bin/console mautic:segment:update

php /var/www/mautic/bin/console/mautic:campaigns:update

php /var/www/mautic/bin/console/mautic:campaigns:trigger


php /var/www/mautic/bin/console/mautic:import

php /var/www/mautic/bin/console/mautic:email:fetch

php /var/www/mautic/bin/console/mautic:iplookup:download

To configure cron intervals

sudo -u www-data crontab -e

Then set intervals using

Be careful with over lapping crons or overloading the serve with running crons too often.