# CREATE External CRON FILE

**URL:** <https://forum.mautic.org/t/create-external-cron-file/2392>\
**Category:** Product Support\
**Created:** [September 23, 2015, 1:22am UTC](https://forum.mautic.org/t/create-external-cron-file/2392 "2015-09-23T01:22:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [September 23, 2015, 1:22am UTC](https://forum.mautic.org/t/create-external-cron-file/2392/1 "2015-09-23T01:22:07Z")

</div>

Hi guys since a lot number of user have problem setup cron job or limitation by hosting providers i have a idea i dont know if is crazy or imposible since im not a programmer.  
  
  
  
The idea is create a file in PHP that have the commands for our Mautic intance and this file with rules and time will be setup in the PHP file.  
  
And this CRON file will be run in CRON Job services like [http://www.cron-job.org](http://www.cron-job.org) (i out this like a sample since i think is the only one FREE that allow 1 minute run)  
  
  
  
What you thinks guys.

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [September 23, 2015, 1:22am UTC](https://forum.mautic.org/t/create-external-cron-file/2392/2 "2015-09-23T01:22:07Z")

</div>

Hi guys since a lot number of user have problem setup cron job or limitation by hosting providers i have a idea i dont know if is crazy or imposible since im not a programmer.

The idea is create a file in PHP that have the commands for our Mautic intance and this file with rules and time will be setup in the PHP file.  
And this CRON file will be run in CRON Job services like [http://www.cron-job.org](http://www.cron-job.org) (i out this like a sample since i think is the only one FREE that allow 1 minute run)

What you thinks guys.

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [September 23, 2015, 2:03pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/3 "2015-09-23T14:03:00Z")

</div>

No body like the idea?

---

<div class="post-metadata">

**Author:** ![ninjoan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ninjoan/32/1005_2.png) [@ninjoan](https://forum.mautic.org/u/ninjoan)\
**Post date:** [September 23, 2015, 3:46pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/4 "2015-09-23T15:46:52Z")

</div>

[SOLVED HERE]  
[https://www.mautic.org/community/index.php/830-script-to-run-mautic-symfony-commands-from-a-url](https://www.mautic.org/community/index.php/830-script-to-run-mautic-symfony-commands-from-a-url)

---

<div class="post-metadata">

**Author:** ![pymexis](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pymexis](https://forum.mautic.org/u/pymexis)\
**Post date:** [July 18, 2016, 2:35pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/5 "2016-07-18T14:35:05Z")

</div>

[quote=3264:@ninjoan]Hi guys since a lot number of user have problem setup cron job or limitation by hosting providers i have a idea i dont know if is crazy or imposible since im not a programmer.

The idea is create a file in PHP that have the commands for our Mautic intance and this file with rules and time will be setup in the PHP file.  
And this CRON file will be run in CRON Job services like [http://www.cron-job.org](http://www.cron-job.org) (i out this like a sample since i think is the only one FREE that allow 1 minute run)

What you thinks guys.[/quote]

[quote=3308:@ninjoan][SOLVED HERE]  
[https://www.mautic.org/community/index.php/830-script-to-run-mautic-symfony-commands-from-a-url[/quote]](https://www.mautic.org/community/index.php/830-script-to-run-mautic-symfony-commands-from-a-url%5B/quote%5D)

[quote=3308:@ninjoan][SOLVED HERE]  
[https://www.mautic.org/community/index.php/830-script-to-run-mautic-symfony-commands-from-a-url[/quote]](https://www.mautic.org/community/index.php/830-script-to-run-mautic-symfony-commands-from-a-url%5B/quote%5D)

---

<div class="post-metadata">

**Author:** ![pymexis](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pymexis](https://forum.mautic.org/u/pymexis)\
**Post date:** [July 18, 2016, 2:47pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/6 "2016-07-18T14:47:07Z")

</div>

Greetings to all,  
I hope my contribution helps the community to improve the script.

This script works with version 1.4, 1.4.1 , …

It does not work with version 2.0 , 2.0.1, …

in error: $input = new ArgvInput($args);

How can we solve this?

---

<div class="post-metadata">

**Author:** ![joew](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@joew](https://forum.mautic.org/u/joew)\
**Post date:** [July 25, 2016, 1:58pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/7 "2016-07-25T13:58:14Z")

</div>

Same issue here. Would love to have this script work with 2.0.1 as well.

---

<div class="post-metadata">

**Author:** ![andrelucasz](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@andrelucasz](https://forum.mautic.org/u/andrelucasz)\
**Post date:** [July 25, 2016, 10:18pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/8 "2016-07-25T22:18:13Z")

</div>

It does not work in 2.0.1

---

<div class="post-metadata">

**Author:** ![cmagnoletes](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@cmagnoletes](https://forum.mautic.org/u/cmagnoletes)\
**Post date:** [August 10, 2016, 8:29pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/9 "2016-08-10T20:29:22Z")

</div>

It seems like there’s a solution at [https://www.mautic.org/community/index.php/5092-mautic-2-0-up-cronjob/p1#p13767](https://www.mautic.org/community/index.php/5092-mautic-2-0-up-cronjob/p1#p13767)

Please let me know if that works for any of you.

---

<div class="post-metadata">

**Author:** ![Jim2564](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@Jim2564](https://forum.mautic.org/u/Jim2564)\
**Post date:** [October 10, 2016, 12:27am UTC](https://forum.mautic.org/t/create-external-cron-file/2392/10 "2016-10-10T00:27:58Z")

</div>

The php file worked for me and I set everything up in [cron-job.org](http://cron-job.org). One thing… the path that it gave me (the php script) had the setting - https(and then the rest of the path). I had to get rid of the “s” and make it “http” and then everything worked fine in [cron-job.org](http://cron-job.org).

I’ve had better luck using [cron-job.org](http://cron-job.org) than [easycron.com](http://easycron.com). [EasyCron.com](http://EasyCron.com) has great support but hostgator was blocking their servers too often.

---

<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:58pm UTC](https://forum.mautic.org/t/create-external-cron-file/2392/11 "2020-02-02T22:58:24Z")

</div>


