# Cron Error

**URL:** <https://forum.mautic.org/t/cron-error/5621>\
**Category:** Product Support\
**Created:** [March 31, 2016, 12:02am UTC](https://forum.mautic.org/t/cron-error/5621 "2016-03-31T00:02:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![filkuzmanovski](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@filkuzmanovski](https://forum.mautic.org/u/filkuzmanovski)\
**Post date:** [March 31, 2016, 12:02am UTC](https://forum.mautic.org/t/cron-error/5621/1 "2016-03-31T00:02:55Z")

</div>

My troubles with cron have been endless and even after trying the commands.php solution as well as cronfig I am still unable to get cron to work.  
  
Here are some screenshots from my crontab -e  
  
[http://imgur.com/OzPz4Yw](http://imgur.com/OzPz4Yw)  
  
  
  
Moving further at my ssh console, I execute the jobs to test them out  
  
Here is what I see:  
  
[http://imgur.com/m8AeruE](http://imgur.com/m8AeruE)  
  
  
  
Now moving onto trying with Cronfig, I got update campaigns to work but the remaining two cronjobs gave me this error:  
  
The bottom image is from one of the cronfig’s jobs:  
  
[http://imgur.com/p72reoW](http://imgur.com/p72reoW)  
  
  
  
Last solution, I found a gist with commands.php and uploaded it to root folder of site and went ahead and changed the secret.  
  
When I go to access the link from my browser, I receive a 404 Not Found nginx error  
  
  
  
Any help is appreciated, not having cron jobs defeats the purpose of my work with Mautic and I’m desperately trying to find a solution.  
  
For reference my VPS is hosted on Digital Ocean,  
  
Ubuntu 14.04 with Nginx, MariaDB , PHP

---

<div class="post-metadata">

**Author:** ![filkuzmanovski](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@filkuzmanovski](https://forum.mautic.org/u/filkuzmanovski)\
**Post date:** [March 31, 2016, 12:02am UTC](https://forum.mautic.org/t/cron-error/5621/2 "2016-03-31T00:02:55Z")

</div>

My troubles with cron have been endless and even after trying the commands.php solution as well as cronfig I am still unable to get cron to work.  
Here are some screenshots from my crontab -e  
[http://imgur.com/OzPz4Yw](http://imgur.com/OzPz4Yw)

Moving further at my ssh console, I execute the jobs to test them out  
Here is what I see:  
[http://imgur.com/m8AeruE](http://imgur.com/m8AeruE)

Now moving onto trying with Cronfig, I got update campaigns to work but the remaining two cronjobs gave me this error:  
The bottom image is from one of the cronfig’s jobs:  
[http://imgur.com/p72reoW](http://imgur.com/p72reoW)

Last solution, I found a gist with commands.php and uploaded it to root folder of site and went ahead and changed the secret.  
When I go to access the link from my browser, I receive a 404 Not Found nginx error

Any help is appreciated, not having cron jobs defeats the purpose of my work with Mautic and I’m desperately trying to find a solution.  
For reference my VPS is hosted on Digital Ocean,  
Ubuntu 14.04 with Nginx, MariaDB , PHP

---

<div class="post-metadata">

**Author:** ![dbhurley](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dbhurley/32/2_2.png) [@dbhurley](https://forum.mautic.org/u/dbhurley)\
**Post date:** [March 31, 2016, 11:57am UTC](https://forum.mautic.org/t/cron-error/5621/3 "2016-03-31T11:57:49Z")

</div>

So if you’re getting a 404 error then it sounds like an htaccess or permissions problem if the browser can’t find the file. My guess is htaccess. Your troubleshooting is the right thinking. However, if you’re on a VPS with DO you should have absolutely no problems running cron with crontab. To clarify, when you run the commands directly from the command line are they successful? Do you see successes and attempts to run campaign-related jobs?

---

<div class="post-metadata">

**Author:** ![filkuzmanovski](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@filkuzmanovski](https://forum.mautic.org/u/filkuzmanovski)\
**Post date:** [March 31, 2016, 3:49pm UTC](https://forum.mautic.org/t/cron-error/5621/4 "2016-03-31T15:49:22Z")

</div>

I am yet to have a successful campaign. When I use non campaign forms and attach them to my site, they execute perfectly but the campaign forms have been a pain, and I am yet to have a successful one. Yesterday I got commands.php working but it crashed my mautic installation and now I am getting this message “Database connection error (code #2002)”

---

<div class="post-metadata">

**Author:** ![filkuzmanovski](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@filkuzmanovski](https://forum.mautic.org/u/filkuzmanovski)\
**Post date:** [March 31, 2016, 4:40pm UTC](https://forum.mautic.org/t/cron-error/5621/5 "2016-03-31T16:40:57Z")

</div>

I’m back up and running after a system reboot , here is my output when I attempt to get things working with Cronfig:  
[http://imgur.com/A2nSEiI](http://imgur.com/A2nSEiI)

This is the campaign that I am trying to execute as an example.  
[http://imgur.com/Xlu4stH](http://imgur.com/Xlu4stH)
