Magento Shopping Feeds生成问题-Detaching feed generation from magento cron

admin   ·   发表于 2021-2-4   ·   网站运维

https://wiki.rocketweb.com/display/RSF/Generating+the+feed 
https://wiki.rocketweb.com/display/RSF/Detaching+feed+generation+from+magento+cron
https://wiki.rocketweb.com/pages/viewpage.action?pageId=20382419 

Reasons to detach:

  • No heartbeat detected message on feeds grid. This is a sign that magento cron fails to schedule the cronjob, as result feed is not generation. 
  • Large catalogs with other backend cron tasks. It may take hours for the cron to generate and this would freeze all other backend tasks for that time. 

Steps to detach:

  1. Go to System > Configuration > Rocket Shopping Feeds > General  > Enable Magento cron and set it to Off. 

    < v2.1.2

    If you are running an older version than v2.1.2, the admin config is missing, so this needs to be done manually by editing module's configuration file and remove or comment out the following lines:

    app/code/community/RocketWeb/ShoppingFeeds/etc/config.xml
    <crontab>
      <jobs>
        <rw_feeds_schedule>
          <schedule><cron_expr>* * * * *</cron_expr></schedule>
          <run><model>rocketshoppingfeeds/observer::processSchedule</model></run>
        </rw_feeds_schedule>
        <rw_feeds_queue>
          <schedule><cron_expr>* * * * *</cron_expr></schedule>
          <run><model>rocketshoppingfeeds/observer::processQueue</model></run>
        </rw_feeds_queue>
      </jobs>
    </crontab>

    Than, clear cache

  2. Set a dedicated crontab, just for feed generation using the included shell script:

    */3 * * * * php /<magento_root>/shell/gsf_generate.php

    Make sure to replace the <magento_root> with the actual path on the server. 

     crontab -e               */3 * * * * php /www/wwwroot/www.xxx.com/shell/gsf_generate.php 

Debugging

If you need to check on the output of feed processing, you could run the script over ssh like this:

第一步:     crontab -e
第二部:   
*/3 * * * * php /www/wwwroot/www.xxx.com/shell/gsf_generate.php

Before you launch this script make sure you set a feed pending for processing. Use the Run Now button in the admin. 

0 条回复   |  直到 2021-2-4 | 409 次浏览
登录后才可发表内容