0

When cron on the server kicks off to start the magento cron, an exception is thrown in var/reports with the error:

a:4:{i:0;s:31:"Invalid cron expression: always";i:1;s:1245:"#0 /home/magento/magento/app/code/core/Mage/Cron/Model/Schedule.php(68): Mage::exception('Mage_Cron', 'Invalid cron ex...') 
#1 /home/magento/magento/app/code/local/Mage/Cron/Model/Observer.php(214): Mage_Cron_Model_Schedule->setCronExpr('always') 
#2 /home/magento/magento/app/code/local/Mage/Cron/Model/Observer.php(168): Mage_Cron_Model_Observer->_generateJobs(Object(Mage_Core_Model_Config_Element), Array) 
#3 /home/magento/magento/app/code/local/Mage/Cron/Model/Observer.php(128): Mage_Cron_Model_Observer->generate() 
#4 /home/magento/magento/app/code/local/Xtento/OrderExport/Model/Observer/Cron/Config.php(22): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer)) 
#5 /home/magento/magento/app/code/core/Mage/Core/Model/App.php(1338): Xtento_OrderExport_Model_Observer_Cron_Config->addCronjobsToConfig(Object(Varien_Event_Observer)) 
#6 /home/magento/magento/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_Model_App->_callObserverMethod(Object(Xtento_OrderExport_Model_Observer_Cron_Config), 'addCronjobsToCo...', Object(Varien_Event_Observer)) 
#7 /home/magento/magento/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('default', Array) 
#8 /home/magento/magento/cron.php(73): Mage::dispatchEvent('default') 
#9 {main}";s:11:"script_name";s:31:"/home/magento/magento/index.php";s:4:"skin";s:5:"admin";}

1 Answer 1

1

The cron expression always is not valid.
Use * * * * * instead.
See a detailed explanation on how the cron expressions should look.

1
  • Thanks for the solution...every where in my code i used * * * * * for cron_expr. but in Core/Enterprise/Index/etc/config.xml it is given "always" for cron_expr. if i change it to * * * * * it is working fine. But we cant override config.xml file in our local... can u plz provide a better solution... or the issue with this "always" in config.xml
    – sateesh
    Feb 6, 2014 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.