# Mautic Cron Jobs Issue & NOT Able to Send Any Campaigns

**URL:** <https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Tags:** community\
**Created:** [October 5, 2020, 8:58pm UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453 "2020-10-05T20:58:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronesteban](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aaronesteban/32/3550_2.png) [@aaronesteban](https://forum.mautic.org/u/aaronesteban)\
**Post date:** [October 5, 2020, 8:58pm UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/1 "2020-10-05T20:58:11Z")

</div>

**Your software**  
My Mautic version is: 3.1.1  
My PHP version is: 7.4.10

**Your problem**  
I have installed Mautic on my Digital Ocean VPS within Linux Ubuntu. But I cannot get my cron jobs to run any campaign tests. Mautic will NOT send any campaigns, only test emails.

I did not install in the usual directory which seems to be:  
**/var/www/html/**

Instead, I have installed inside of the main directory of my website (not on a subdomain) as shown in the image below:  
**/var/www/aaronsnewsletters.com/public\_html/**

 ![Mautic-Installation-Path](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2b18c1d061ec8648b3f9f9ff03c9d3ce031badcd.png)

I have tried setting up the proper cron jobs located in the following directories or as shown in the image below:

 ![cron-jobs-1](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/923483778cf27764159db898dbb38257d20b0b34.png)

My “cron-jobs.txt” file is located in the following directory:  
**/var/www/aaronsnewsletters.com/public\_html/**

and looks like what is shown in the image below:

 ![cron jobs file](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/149deeb536bb46d638707af23928c50e5b0797ec.png)

I would appreciate it if someone could further guide me in the right direction with ensuring that I have set up the correct cron jobs and file path directories. Thanks.

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [October 5, 2020, 11:02pm UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/2 "2020-10-05T23:02:13Z")

</div>

Replace all the /apps/console to /bin/console

> [@aaronesteban](#):
>
> cron-jobs.txt

That is not a cron job, it might have been place there for reference

---

<div class="post-metadata">

**Author:** ![aaronesteban](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aaronesteban/32/3550_2.png) [@aaronesteban](https://forum.mautic.org/u/aaronesteban)\
**Post date:** [October 6, 2020, 1:20am UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/3 "2020-10-06T01:20:41Z")

</div>

Okay, so I changed to the recommended path, but it still won’t send campaigns. Any other ideas of what could be missing? Please check the image below:

 ![CronJobs3](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a85647f03ea09be5d88b94c8053b5663217e5e37.png)

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [October 6, 2020, 1:38am UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/4 "2020-10-06T01:38:12Z")

</div>

Why are u editing the cron tab manually, this is a bad practice, but you should be fine if you know what you are doing.

Remove the -q option and try again

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 6, 2020, 1:40am UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/5 "2020-10-06T01:40:56Z")

</div>

remove the console.php  
for example: **your-mautic-install/bin/console mautic:campaigns:trigger**

here is one of mine complete

**/opt/plesk/php/7.3/bin/php /var/www/vhosts/mauticinstall/bin/console mautic:campaigns:trigger**  
I copy/past that in an SSH and bam-

Im running Centos 7 - plesk panel so there will be variances

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 6, 2020, 7:43am UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/6 "2020-10-06T07:43:30Z")

</div>

> [@aaronesteban](#):
>
> [aaronsnewsletters.com](http://aaronsnewsletters.com)

Please run your cron commands in ssh and past the result here.  
Why am I saying that?  
Because the error will show you:

- your path to php is wrong
- your php path is fine, but your mautic path is not okay
- both are fine, but there is something wrong with you r campaign settings (you forgot to publish one part of your campaign)

---

<div class="post-metadata">

**Author:** ![aaronesteban](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aaronesteban/32/3550_2.png) [@aaronesteban](https://forum.mautic.org/u/aaronesteban)\
**Post date:** [October 6, 2020, 4:49pm UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/7 "2020-10-06T16:49:29Z")

</div>

I try to edit the crontab file to create con jobs by using ssh “sudo crontab -e” and “crontab -e”, but I keep getting the following error message (or as shown in the image below):

> [@](#):
>
> no crontab for root - using an empty one
> 
> crontab: installing new crontab
> 
> “/tmp/crontab.C7Hy04/crontab”:22: bad minute
> 
> errors in crontab file, can’t install.

 ![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/415099a36ddf8ceeb483a485212100d6e24b7783.png)

And the file path location " **/var/spool/cron/crontabs/**" folder is empty. Shouldn’t there be a cron file of some type to edit?

So what I’m trying to do is create cron jobs to handle my Mautic cron tasks/jobs as shown below:

php /var/www/aaronsnewsletters.com/public\_html/bin/console mautic:segments:update

php /var/www/aaronsnewsletters.com/public\_html/bin/console mautic:campaigns:update

php /var/www/aaronsnewsletters.com/public\_html/bin/console mautic:campaigns:trigger

php /var/www/aaronsnewsletters.com/public\_html/bin/console mautic:iplookup:download

php /var/www/aaronsnewsletters.com/public\_html/bin/console mautic:broadcasts:send

php /var/www/aaronsnewsletters.com/public\_html/bin/console mautic:maintenance:cleanup --days-old=60 --no-interaction

Do I need to somehow reinstall the crontab setup or how do I get back to being able to edit with nano? At this point I’m not able to edit the main crontab file & nor do I know where it is located.

Thanks for any support.

P.S.  
BTW, I tried to reinstall crontab and cron jobs, that’s when I started experiencing this error message.

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 6, 2020, 5:17pm UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/8 "2020-10-06T17:17:09Z")

</div>

> [@devsrealm](#):
>
> Why are u editing the cron tab manually, this is a bad practice, …

Perhaps use the cron function in Cpanel or whatever is available for your VPS in the future.

There is no point in adding crons (by any method) until you have tested and verified the formatting by executing manually via SSH and observing the output as noted by @joeyk previously.

Here is an excellent discussion for reference

> <https://askubuntu.com/questions/216692/where-is-the-user-crontab-stored>

It was strangely conspicuous as the first result of a google search of “ubuntu crontab file location”

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 6, 2020, 7:03pm UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/9 "2020-10-06T19:03:08Z")

</div>

Your error shows ‘bad minute’ .  
Maybe check if the format is correct. Did you add the timing? 🙂

> **[Cron jobs](https://docs.mautic.org/en/setup/cron-jobs)**
>
> . . . . Mautic 3 introduced a new path for cron jobs bin/console if you are using the legacy Mautic 2.x series you should replace this with the older version, app/console. . . . Mautic requires a few cron jobs to handle some maintenance tasks such as...

---

<div class="post-metadata">

**Author:** ![aaronesteban](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aaronesteban/32/3550_2.png) [@aaronesteban](https://forum.mautic.org/u/aaronesteban)\
**Post date:** [October 7, 2020, 1:09am UTC](https://forum.mautic.org/t/mautic-cron-jobs-issue-not-able-to-send-any-campaigns/16453/10 "2020-10-07T01:09:16Z")

</div>

Thanks brother! I actually realized it a while back, but thanks anyhow.
