# Cron settings (issue with server)

**URL:** <https://forum.mautic.org/t/cron-settings-issue-with-server/1972>\
**Category:** Product Support\
**Created:** [June 17, 2015, 2:00pm UTC](https://forum.mautic.org/t/cron-settings-issue-with-server/1972 "2015-06-17T14:00:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mischung](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mischung](https://forum.mautic.org/u/mischung)\
**Post date:** [June 17, 2015, 2:00pm UTC](https://forum.mautic.org/t/cron-settings-issue-with-server/1972/1 "2015-06-17T14:00:52Z")

</div>

Hi guys,  
  
I like Mautic. All is great but I have big issue with cron settings.  
  
I do not know where to insert that command. My servers do not have cPanel.  
  
  
  
I am used to run crons by url that is simple just insert set time and it runs. But Mautic has those mautic:campaigns:update where I can insert those parameters? Everywhere is just field for url and nothing else. If I run basic (ex. [email.mydomain.com/app/console](http://email.mydomain.com/app/console)) it does nothing.  
  
  
  
Can anybody help me with it?  
  
I have tried to run it as file\_get\_contents, used external services like [easycron.com](http://easycron.com) but nothing trigger or update my mautic stats.  
  
File structure of php file that I can run by cron url (ex. [mydomain.com/update\_mautic.php](http://mydomain.com/update_mautic.php)) or anything what can help me.  
  
  
  
I am in touch with server provider, other programmers but nobody knows. Can you help me?

---

<div class="post-metadata">

**Author:** ![mischung](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mischung](https://forum.mautic.org/u/mischung)\
**Post date:** [June 17, 2015, 2:00pm UTC](https://forum.mautic.org/t/cron-settings-issue-with-server/1972/2 "2015-06-17T14:00:52Z")

</div>

Hi guys,  
I like Mautic. All is great but I have big issue with cron settings.  
I do not know where to insert that command. My servers do not have cPanel.

I am used to run crons by url that is simple just insert set time and it runs. But Mautic has those mautic:campaigns:update where I can insert those parameters? Everywhere is just field for url and nothing else. If I run basic (ex. [email.mydomain.com/app/console](http://email.mydomain.com/app/console)) it does nothing.

Can anybody help me with it?  
I have tried to run it as file\_get\_contents, used external services like [easycron.com](http://easycron.com) but nothing trigger or update my mautic stats.  
File structure of php file that I can run by cron url (ex. [mydomain.com/update\_mautic.php](http://mydomain.com/update_mautic.php)) or anything what can help me.

I am in touch with server provider, other programmers but nobody knows. Can you help me?

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [June 20, 2015, 6:40am UTC](https://forum.mautic.org/t/cron-settings-issue-with-server/1972/3 "2015-06-20T06:40:30Z")

</div>

For most cron jobs, you would use the full path to your Mautic install to run the cronjob. Something like this (which is a raw cronjob):

```auto
*/5 * * * * php /home/myuser/public_html/mautic/app/console mautic:leadlists:update -e prod
```

If you don’t know the full path to your web root, you may be able to use `~/public_html` instead if you are using a Linux host.

If your server doesn’t support running PHP commands directly from cron, then you can try to create a several PHP scripts that are web accessible with something like the following:

```auto
<?php
require_once __DIR__.'/app/bootstrap.php.cache';
require_once __DIR__.'/app/AppKernel.php';

use SymfonyBundleFrameworkBundleConsoleApplication;
use SymfonyComponentConsoleInputArgvInput;
use SymfonyComponentConsoleOutputBufferedOutput;

try {
    $args = array('console', 'mautic:leadlists:update', '--env=prod', '--no-debug');
    $input = new ArgvInput($args);
    $output = new BufferedOutput();

    $kernel = new AppKernel('prod', false);
    $application = new Application($kernel);
    $application->setAutoExit(false);
    $result = $application->run($input, $output);

    echo "<pre>n".$output->fetch().'</pre>';
} catch (Exception $exception) {
    echo $exception->getMessage();
}
```

Create one per command and change the specific command in `$args = array('console', 'mautic:leadlists:update', '--env=prod', '--no-debug');` (replace ‘mautic:leadlists:update’ with the command needed). Note that using a web script may hit PHP time limits which may cause issues for large lists.

---

<div class="post-metadata">

**Author:** ![mischung](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mischung](https://forum.mautic.org/u/mischung)\
**Post date:** [July 2, 2015, 11:54am UTC](https://forum.mautic.org/t/cron-settings-issue-with-server/1972/4 "2015-07-02T11:54:49Z")

</div>

Cool, thank you. It looks that it works.  
This should definitely be somewhere in tutorial for people like me.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:59pm UTC](https://forum.mautic.org/t/cron-settings-issue-with-server/1972/5 "2020-02-02T22:59:23Z")

</div>


