# Cron Jobs Inquiry

**URL:** https://forum.mautic.org/t/cron-jobs-inquiry/10165
**Category:** Product Support
**Created:** [January 26, 2018, 8:59pm UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165 "2018-01-26T20:59:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![salahsaqr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/salahsaqr/32/3471_2.png) [@salahsaqr](https://forum.mautic.org/u/salahsaqr)
#### Post date: [January 26, 2018, 8:59pm UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/1 "2018-01-26T20:59:55Z")

</div>

Hi friends,

Yesterday, I finished the installation process of Mautic 2.12.1 on my VPS. Everything is OK. Now I have to create Cron Jobs but I realized that there are some differences between those cron jobs suggestions on the Internet. Check these suffixes:

1. 

path/to/php path/to/mautic/app/console mautic:segments:update  
path/to/php path/to/mautic/app/console mautic:campaigns:rebuild  
path/to/php path/to/mautic/app/console mautic:campaigns:trigger  
path/to/php path/to/mautic/app/console mautic:emails:send  
path/to/php path/to/mautic/app/console mautic:social:monitoring

1. 

php /home/admin/web/domain.com/public\_html/mautic/app/console mautic:email:fetch \> /dev/null 2\>&1  
php /home/admin/web/domain.com/public\_html/mautic/app/console mautic:messages:send \> /dev/null 2\>&1  
php /home/admin/web/domain.com/public\_html/mautic/app/console mautic:campaigns:trigger \> /dev/null 2\>&1  
php /home/admin/web/domain.com/public\_html/mautic/app/console mautic:campaigns:rebuild \> /dev/null 2\>&1  
php /home/admin/web/domain.com/public\_html/mautic/app/console mautic:segments:update \> /dev/null 2\>&1  
php /home/admin/web/domain.com/public\_html/mautic/app/console mautic:webhooks:process \> /dev/null 2\>&1

1. 

php /path/to/mautic/app/console mautic:leadlists:update –env=prod  
php /path/to/mautic/app/console mautic:campaigns:update –env=prod  
php /path/to/mautic/app/console mautic:campaigns:trigger –env=prod  
php /path/to/mautic/app/console mautic:email:process –env=prod

How can I know what I need to use? Are these suffixes important?

Thanks a lot!  
Salah

---

<div class="post-metadata">

### Author: ![bizcrony](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bizcrony/32/409_2.png) [@bizcrony](https://forum.mautic.org/u/bizcrony)
#### Post date: [January 27, 2018, 11:52am UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/2 "2018-01-27T11:52:22Z")

</div>

Its depends on your server … how they are ready to configure cron jobs///

---

<div class="post-metadata">

### Author: ![mpeet](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@mpeet](https://forum.mautic.org/u/mpeet)
#### Post date: [February 3, 2018, 3:55am UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/3 "2018-02-03T03:55:36Z")

</div>

Hi, I’ve recently installed Mautic and have just registered on this site. Not entirely sure of the etiquette for posting, however, was/am having problems with CRON jobs as well and was wondering if it is ‘OK’ to post my problem on this post? Please excuse if not… I have used the following as the format for my CRON jobs

/opt/bitnami/php/bin/php -f /home/bitnami/htdocs/mymautic/app/console mautic:email:process –env=prod

When I run the CRON I get the following

[Symfony\Component\Console\Exception\CommandNotFoundException]  
Command “mautic:email:process” is not defined.

Did you mean one of these?  
mautic:email:fetch  
mautic:queue:process  
swiftmailer:email:send  
mautic:webhooks:process  
mautic:emails:send  
mautic:emails:fetch

I get similar returns for the leadlists:update, campaigns:update and campaigns:trigger CRONs… is this the correct behaviour or is something misconfigured? I am installed on an Amazon Lightsail server with a Bitnami stack, PHP 7.0.27-1, Apache 2.4.25, MySQL 5.6.35 and Mautic 2.12.1

Any assistance you can give me gratefully accepted - and apologies if I have hijacked this post

---

<div class="post-metadata">

### Author: ![mpeet](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@mpeet](https://forum.mautic.org/u/mpeet)
#### Post date: [February 3, 2018, 4:08am UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/4 "2018-02-03T04:08:41Z")

</div>

Sorry bizcrony, I appear to be getting this totally wrong… could you give me a link to the default CRON jobs that need to be setup please? I noticed there are a number of different jobs in Salahs posting - I have managed to get some ‘good’ responses e.g.

segments:update completes successfully  
campaigns:rebuild completes successfully  
campaigns:trigger completes successfully  
emails:send - ERROR Mautic is not set to queue email  
social:monitoring - ERROR No published monitors found. Make sure the id you supplied is published

Thanks for your time and patience

---

<div class="post-metadata">

### Author: ![bizcrony](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bizcrony/32/409_2.png) [@bizcrony](https://forum.mautic.org/u/bizcrony)
#### Post date: [February 3, 2018, 4:13am UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/5 "2018-02-03T04:13:26Z")

</div>

Need to check

---

<div class="post-metadata">

### Author: ![salahsaqr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/salahsaqr/32/3471_2.png) [@salahsaqr](https://forum.mautic.org/u/salahsaqr)
#### Post date: [February 3, 2018, 5:25am UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/6 "2018-02-03T05:25:03Z")

</div>

Here is the link \>\> [https://mautic.org/docs/en/setup/cron\_jobs.html](https://mautic.org/docs/en/setup/cron_jobs.html)

By the way…

\> /dev/null 2\>&1  
–env=prod

These are not important “as I have been told”. It should store log only if you have any issues with Cron Jobs. If Cron Jobs work fine there is no need to have it.

Just in case you’re not sure about PHP path, you can type this command in SSH to know for sure where your PHP is locating:

# which php

Actually, don’t know if this would help but it’s here in case someone care 🙂

---

<div class="post-metadata">

### Author: ![mpeet](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@mpeet](https://forum.mautic.org/u/mpeet)
#### Post date: [February 3, 2018, 12:46pm UTC](https://forum.mautic.org/t/cron-jobs-inquiry/10165/7 "2018-02-03T12:46:52Z")

</div>

Thanks Salah and Bizcrony, greatly appreciated
