Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to properly run/setup Cron script (and receiving memory errors)
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

I’m receiving the following errors when the cron script runs:

Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 363 bytes) in /path/lib/Zend/Db/Select.php on line 799

In .htaccess it’s calling for 64mb for PHP memory, but I think my hosting only has 32mb setup.  Could this be the problem?  If so, how do I increase the PHP memory on the server?  The php.ini file?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
asrenzo
Member
 
Avatar
Total Posts:  42
Joined:  2008-02-25
France
 

Hi,

On a *nix system, if your scripts are launched by a system cron (like /etc/crontab), just add this line at the top of the file

MAILTO=me@somewhere.com

You’ll need to have a running smtp setup on this server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

My host (Crucial) was able to up the setting on their end.  We’ll see if the Cron runs correctly tonight at midnight.

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 

Brady, just out of curiosity what is the cron job for? What does it do?  Thx.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

The Cron job is suppose to automatically generate daily Google Sitemaps, update the currency, run inventory reports, etc.  All good built-in stuff that Magento offers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

The Cron task just ran, but I’m still receiving (serious) errors:

<br />
<b>Warning</b>:  include_once(Mage/Core/functions.php) [<a href=’function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in <b>/path/app/Mage.php</b> on line <b>44</b><br />
<br />
<b>Warning</b>:  include_once() [<a href=’function.include’>function.include</a>]: Failed opening ‘Mage/Core/functions.php’ for inclusion (include_path=’/path/app/code/local:/path/app/code/community:/path/app/code/core:/path/lib:.:/usr/lib/php:/usr/local/lib/php’) in <b>/path/app/Mage.php</b> on line <b>44</b><br />
<br />
<b>Fatal error</b>:  Call to undefined function checkMagicQuotes() in <b>path/app/Mage.php</b> on line <b>52</b><br />

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 
Brady - 27 May 2008 02:14 PM

The Cron job is suppose to automatically generate daily Google Sitemaps, update the currency, run inventory reports, etc.  All good built-in stuff that Magento offers.

Very cool, I will have to look into that.  Keep us posted when you get it fixed! Chuckle, we can learn from your experience. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

I guess it’s partially working b/c it DID generate a Google Sitemap.

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 
Brady - 27 May 2008 03:14 PM

The Cron task just ran, but I’m still receiving (serious) errors:


<br />
<b>Warning</b>:  include_once(Mage/Core/functions.php) [<a href=’function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in <b>/path/app/Mage.php</b> on line <b>44</b><br />
<br />
<b>Warning</b>:  include_once() [<a href=’function.include’>function.include</a>]: Failed opening ‘Mage/Core/functions.php’ for inclusion (include_path=’/path/app/code/local:/path/app/code/community:/path/app/code/core:/path/lib:.:/usr/lib/php:/usr/local/lib/php’) in <b>/path/app/Mage.php</b> on line <b>44</b><br />
<br />
<b>Fatal error</b>:  Call to undefined function checkMagicQuotes() in <b>path/app/Mage.php</b> on line <b>52</b><br />

Failed to open often is permissions. I imagine you have checked that, but thought I’d thorw it out there in case. It sure sounds like it, or the path is wrong.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

Seems to be working now.  Not sure what changed, except I cleared the cache and deleted the sessions.  Maybe it was seeing an old permission setting on one of the files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Princeanil
Jr. Member
 
Total Posts:  28
Joined:  2008-05-06
 

Brady

I’ve just setup my first store using magento.  I’ve trying to figure out which cron.php files needs to be called to do all these tasks. Can you pls guide me to it ?

When I run execute the default cron.php which is in the magento root folder, nothing happens. Is there another cron file that needs to be called for all the tasks you mentioned to happen ?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top