Magento cron在除了一個模塊以外的所有模塊中都能正常工作。此模塊是Google受信任的商店。這個問題也被其他magento用戶報告過。magento模塊(Google可信任商店)的Cron無法正常工作
我查看了cron_schedule表,並且此模塊沒有待定任務。當我手動將此模塊的cron任務插入到cron_schedule表中時,此模塊完全按照本應該執行的操作進行。那麼,對於這個cron工作,這個模塊有什麼問題?這是config.xml。我想一旦我們解決了這個問題,模塊就好了。
<?xml version="1.0"?>
<!--
/**
* Magento Enterprise Edition
*
* NOTICE OF LICENSE
*
* This source file is subject to the Magento Enterprise Edition License
* that is bundled with this package in the file LICENSE_EE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.magentocommerce.com/license/enterprise-edition
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_GoogleTrustedStore
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://www.magentocommerce.com/license/enterprise-edition
*/
-->
<config>
<modules>
<Mage_GoogleTrustedStore>
<version>1.6.0.0</version>
</Mage_GoogleTrustedStore>
</modules>
<global>
<helpers>
<googletrustedstore>
<class>Mage_GoogleTrustedStore_Helper</class>
</googletrustedstore>
</helpers>
<models>
<googletrustedstore>
<class>Mage_GoogleTrustedStore_Model</class>
</googletrustedstore>
</models>
<resources>
<googletrustedstore_setup>
<setup>
<module>Mage_GoogleTrustedStore</module>
</setup>
</googletrustedstore_setup>
</resources>
<blocks>
<googletrustedstore>
<class>Mage_GoogleTrustedStore_Block</class>
</googletrustedstore>
</blocks>
<googletrustedstore>
<google_group_email>[email protected]</google_group_email>
<order_cancellation_reasons>
<BuyerCanceled>Buyer Canceled</BuyerCanceled>
<MerchantCanceled>Merchant Canceled</MerchantCanceled>
<DuplicateInvalid>Duplicate Invalid</DuplicateInvalid>
<FraudFake>Fraud Fake</FraudFake>
</order_cancellation_reasons>
<ftp_host>uploads.google.com</ftp_host>
<carriers>
<main>
<ups>UPS</ups>
<fedex>FedEx</fedex>
<usps>USPS</usps>
</main>
<other>
<dhl>DHL</dhl>
<dhlint>DHL</dhlint>
</other>
</carriers>
</googletrustedstore>
</global>
<default>
<google>
<trustedstore>
<enabled>1</enabled>
<default_order_cancellation_reason>BuyerCanceled</default_order_cancellation_reason>
<estimated_ship_date>3</estimated_ship_date>
</trustedstore>
</google>
</default>
<frontend>
<layout>
<updates>
<googletrustedstore>
<file>googletrustedstore.xml</file>
</googletrustedstore>
</updates>
</layout>
<events>
<checkout_multishipping_controller_success_action>
<observers>
<googletrustedstore>
<type>model</type>
<class>googletrustedstore/observer</class>
<method>collectMultishippingOrderIds</method>
</googletrustedstore>
</observers>
</checkout_multishipping_controller_success_action>
</events>
</frontend>
<adminhtml>
<translate>
<modules>
<Mage_GoogleShopping>
<files>
<default>Mage_GoogleTrustedStore.csv</default>
</files>
</Mage_GoogleShopping>
</modules>
</translate>
<layout>
<updates>
<googletrustedstore>
<file>googletrustedstore.xml</file>
</googletrustedstore>
</updates>
</layout>
<events>
<sales_order_save_before>
<observers>
<googletrustedstore>
<type>model</type>
<class>googletrustedstore/observer</class>
<method>addCancellationReasonToOrder</method>
</googletrustedstore>
</observers>
</sales_order_save_before>
<sales_convert_order_to_quote>
<observers>
<googletrustedstore>
<type>model</type>
<class>googletrustedstore/observer</class>
<method>addCancellationReasonToSession</method>
</googletrustedstore>
</observers>
</sales_convert_order_to_quote>
<checkout_submit_all_after>
<observers>
<googletrustedstore>
<type>model</type>
<class>googletrustedstore/observer</class>
<method>collectAdminOrderId</method>
</googletrustedstore>
</observers>
</checkout_submit_all_after>
<controller_action_predispatch_adminhtml_sales_order_index>
<observers>
<googletrustedstore>
<type>model</type>
<class>googletrustedstore/observer</class>
<method>addOrderGridBlocksRenderingObserver</method>
</googletrustedstore>
</observers>
</controller_action_predispatch_adminhtml_sales_order_index>
</events>
</adminhtml>
<crontab>
<jobs>
<googletrustedstore_generate_feeds>
<schedule>
<cron_expr>0/20 * * * *</cron_expr>
</schedule>
<run>
<model>googletrustedstore/feeder::generateFeeds</model>
</run>
</googletrustedstore_generate_feeds>
<googletrustedstore_upload_feeds>
<schedule>
<cron_expr>0 2 * * *</cron_expr>
</schedule>
<run>
<model>googletrustedstore/feeder::uploadFeeds</model>
</run>
</googletrustedstore_upload_feeds>
</jobs>
</crontab>
</config>
我不確定模型解決了。您可以嘗試將模型更改爲「Mage_GoogleTrustedStore_Model_Feeder' :: yourMethod。在cron配置中一切看起來都很好。 – 2013-02-26 22:36:36
謝謝Fabian,最後,我發現cron很好。但它不是基本生成文本文件。最初,cron是在午夜之前設置的,在我試圖看到它們之前,它們正從cron_schedule表中刪除。當我將其改爲每20分鐘一次時,我發現它很好。所以,問題出現在別的地方。我會試着弄清楚並在模塊評論中寫下來,這樣可以幫助其他人排除故障或理解它。 – Robi 2013-02-27 16:59:12
供稿不會生成和更新。什麼是問題以及如何解決這個問題? – alamelu 2014-11-10 08:43:52