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

**URL:** <https://forum.mautic.org/t/how-do-i-run-cron-jobs-on-aws-ec2-ubuntu-server/28849>\
**Category:** Product Support\
**Created:** [August 5, 2023, 8:07am UTC](https://forum.mautic.org/t/how-do-i-run-cron-jobs-on-aws-ec2-ubuntu-server/28849 "2023-08-05T08:07:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssdesign](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ssdesign/32/10291_2.png) [@ssdesign](https://forum.mautic.org/u/ssdesign)\
**Post date:** [August 5, 2023, 8:07am UTC](https://forum.mautic.org/t/how-do-i-run-cron-jobs-on-aws-ec2-ubuntu-server/28849/1 "2023-08-05T08:07:56Z")

</div>

**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.

Thanks

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [August 6, 2023, 7:04am UTC](https://forum.mautic.org/t/how-do-i-run-cron-jobs-on-aws-ec2-ubuntu-server/28849/2 "2023-08-06T07:04:00Z")

</div>

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

mautic:emails:send

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[https://crontab.guru/](https://crontab.guru/)

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