# Cron job failing due to undefined variables?

**URL:** <https://forum.mautic.org/t/cron-job-failing-due-to-undefined-variables/8804>\
**Category:** Product Support\
**Created:** [June 23, 2017, 2:26pm UTC](https://forum.mautic.org/t/cron-job-failing-due-to-undefined-variables/8804 "2017-06-23T14:26:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwrobbs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jwrobbs/32/42_2.png) [@jwrobbs](https://forum.mautic.org/u/jwrobbs)\
**Post date:** [June 23, 2017, 2:26pm UTC](https://forum.mautic.org/t/cron-job-failing-due-to-undefined-variables/8804/1 "2017-06-23T14:26:20Z")

</div>

Situation:  
  
Mautic installed via Softaculous. (Hosting: shared hosting on A2)  
  
Cron jobs set.  
  
(Example: php /home/{path}/app/console mautic:segments:update  
  
Cron jobs aren’t working because it isn’t seeing the commands. Just getting the command options as output.  
  
  
  
I contact support and mention register\_argc\_argv. ([https://www.mautic.org/community/index.php/3016-cron-just-returns-list-of-available-commands/0#p9002](https://www.mautic.org/community/index.php/3016-cron-just-returns-list-of-available-commands/0#p9002))  
  
  
  
They replied with  
  
“The file “console” inside it has references to paths and variables not listed for example: “_ **DIR** _” is not defined and we would require you to contact Mautic or your developer and discuss how to work this correctly.  
  
  
  
The cron environment, will not see variables unless they are defined in the scriot itself.”  
  
  
  
The console file created by Softaculous and the one I downloaded look identical.  
  
  
  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![jwrobbs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jwrobbs/32/42_2.png) [@jwrobbs](https://forum.mautic.org/u/jwrobbs)\
**Post date:** [June 23, 2017, 2:26pm UTC](https://forum.mautic.org/t/cron-job-failing-due-to-undefined-variables/8804/2 "2017-06-23T14:26:20Z")

</div>

Situation:  
Mautic installed via Softaculous. (Hosting: shared hosting on A2)  
Cron jobs set.  
(Example: php /home/{path}/app/console mautic:segments:update  
Cron jobs aren’t working because it isn’t seeing the commands. Just getting the command options as output.

I contact support and mention register\_argc\_argv. ([https://www.mautic.org/community/index.php/3016-cron-just-returns-list-of-available-commands/0#p9002](https://www.mautic.org/community/index.php/3016-cron-just-returns-list-of-available-commands/0#p9002))

They replied with  
"The file “console” inside it has references to paths and variables not listed for example: “_ **DIR** _” is not defined and we would require you to contact Mautic or your developer and discuss how to work this correctly.

The cron environment, will not see variables unless they are defined in the scriot itself."

The console file created by Softaculous and the one I downloaded look identical.

Any suggestions?
