# Cronjob commands not running

**URL:** <https://forum.mautic.org/t/cronjob-commands-not-running/7975>\
**Category:** Product Support\
**Created:** [March 20, 2017, 7:02pm UTC](https://forum.mautic.org/t/cronjob-commands-not-running/7975 "2017-03-20T19:02:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Pardini](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Gabriel\_Pardini](https://forum.mautic.org/u/Gabriel_Pardini)\
**Post date:** [March 20, 2017, 7:02pm UTC](https://forum.mautic.org/t/cronjob-commands-not-running/7975/1 "2017-03-20T19:02:21Z")

</div>

Hi there,  
  
I have a 2.6.1 mautic instalation and have setup the cron jobs according to the documentation as follows  
  
 ![Crons.png](http://mkt.onebeleza.com.br/Crons.png)  
  
The difference between the php paths its only for testing purposes and both give the same result.  
  
Also i don´t have SSH access to the server.  
  
  
  
The problem is that when i check the email with the status for the cronjob, i always receivfe this:  
  
  
  
Mautic version 2.6.1 - app/prod  
  
  
  
Usage:  
  
command [options] [arguments]  
  
  
  
Options:  
  
-h, --help Display this help message  
  
-q, --quiet Do not output any message  
  
-V, --version Display this application version  
  
–ansi Force ANSI output  
  
–no-ansi Disable ANSI output  
  
-n, --no-interaction Do not ask any interactive question  
  
-s, --shell Launch the shell.  
  
–process-isolation Launch commands from shell as a separate process.  
  
-e, --env=ENV The Environment name. [default: “prod”]  
  
–no-debug Switches off debug mode.  
  
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug  
  
  
  
Available commands:  
  
help Displays help for a command  
  
list Lists commands  
  
assets  
  
  
  
and the rest of the CLI commands for Mautic…  
  
  
  
None of the commands work and i can´t find out why. i even tried running the config debug but nothing.  
  
Does anyone knows what might be going on? Some misconfiguration that i made?

---

<div class="post-metadata">

**Author:** ![Gabriel\_Pardini](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Gabriel\_Pardini](https://forum.mautic.org/u/Gabriel_Pardini)\
**Post date:** [March 20, 2017, 7:02pm UTC](https://forum.mautic.org/t/cronjob-commands-not-running/7975/2 "2017-03-20T19:02:21Z")

</div>

Hi there,  
I have a 2.6.1 mautic instalation and have setup the cron jobs according to the documentation as follows  
 ![](http://mkt.onebeleza.com.br/Crons.png)  
The difference between the php paths its only for testing purposes and both give the same result.  
Also i don´t have SSH access to the server.

The problem is that when i check the email with the status for the cronjob, i always receivfe this:

Mautic version 2.6.1 - app/prod

Usage:  
command [options] [arguments]

Options:  
-h, --help Display this help message  
-q, --quiet Do not output any message  
-V, --version Display this application version  
–ansi Force ANSI output  
–no-ansi Disable ANSI output  
-n, --no-interaction Do not ask any interactive question  
-s, --shell Launch the shell.  
–process-isolation Launch commands from shell as a separate process.  
-e, --env=ENV The Environment name. [default: “prod”]  
–no-debug Switches off debug mode.  
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:  
help Displays help for a command  
list Lists commands  
assets

and the rest of the CLI commands for Mautic…

None of the commands work and i can´t find out why. i even tried running the config debug but nothing.  
Does anyone knows what might be going on? Some misconfiguration that i made?

---

<div class="post-metadata">

**Author:** ![JConnell](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jconnell/32/159_2.png) [@JConnell](https://forum.mautic.org/u/JConnell)\
**Post date:** [March 28, 2017, 7:29pm UTC](https://forum.mautic.org/t/cronjob-commands-not-running/7975/3 "2017-03-28T19:29:51Z")

</div>

@Gabriel Pardini There’s a lot going on with your entries:

mautic:email:process should be changed to mautic:emails:send

mautic:broadcasts:send should be added as a new job (probably with the same timing as mautic:email:send)

I’ve never seen mautic:config:debug before although it might be valid. What are you hoping to achieve with that one?

mautic:iplookup:download should only be run once a week as the file is only updated once per month.

The entry ending in ‘update-maxmind-database’ is weird. Is this pointing to a custom script you made? If not it can safely be deleted.

You’re calling php with `php` for some entries and `/usr/bin/php` for others. I’d recommend you change them all to /usr/bin/php first, change to php if those don’t work, and contact your web host and ask where php is located if neither of those work.

In regards to logging, I’d ask your host to install [moreutils](http://joeyh.name/code/moreutils/) and then use something like the following which I’ve adjusted to match your timings:

[code]# Main Mautic Cronjobs  
\*/5 \* \* \* \* php /path/to/your\_mautic/app/console mautic:campaigns:rebuild|ts\>\>/var/log/mautic.cron 2\>&1  
\*/10 \* \* \* \* php /path/to/your\_mautic/app/console mautic:campaigns:trigger|ts\>\>/var/log/mautic.cron 2\>&1  
\*/12 \* \* \* \* php /path/to/your\_mautic/app/console mautic:segments:update|ts\>\>/var/log/mautic.cron 2\>&1  
\*/15 \* \* \* \* php /path/to/your\_mautic/app/console mautic:emails:send|ts\>\>/var/log/mautic.cron 2\>&1  
\*/15 \* \* \* \* php /path/to/your\_mautic/app/console mautic:broadcasts:send|ts\>\>/var/log/mautic.cron 2\>&1  
\*/20 \* \* \* \* php /path/to/your\_mautic/app/console mautic:emails:fetch|ts\>\>/var/log/mautic.cron 2\>&1  
\*/35 \* \* \* \* php /path/to/your\_mautic/app/console mautic:social:monitoring|ts\>\>/var/log/mautic.cron 2\>&1

# Fetch the iplookup database every Wednesday

0 \* \* \*/1 3 php /path/to/your\_mautic/app/console mautic:iplookup:download|ts\>\>/var/log/mautic.cron 2\>&1[/code]

Then you can monitor your crons by checking /var/log/mautic.cron and it will have precise timestamps thanks to moreutils (the ‘ts’ command in the cron entries).

---

<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:** [March 28, 2017, 8:03pm UTC](https://forum.mautic.org/t/cronjob-commands-not-running/7975/4 "2017-03-28T20:03:06Z")

</div>

from where you are applying cron jobs ?
