Language Selection

Home News & Blog Developers' Blog The role and usage tutorial of cron job in Magento
Friday, 26 May 2017 14:04

The role and usage tutorial of cron job in Magento

计划任务(cron job)是Magento系统中一个很有用甚至可以说必须使用的功能,而最近在网上跟人聊天发现很多Magento的使用者不知道这个功能或者知道却认为可有可无,我在这里建议各位Magento的使用者,把这个功能使用起来吧。

在之前关于Newsletter的那篇博文我有讲到,要使新闻能按设定的时间自动发送,就必须设置好计划任务(cron job)。计划任务(cron job)简单的来说就是在系统中每隔一段时间来重复操作一件事,比如每隔多少时间清理日志,比如每天提交Sitemap给google等等。

而要设置计划任务(cron job),需要在网站运行的服务器(以Linux为例)写一段脚本来定时调用网站根目录下的cron.PHP文件。下面是我自己使用的服务器的设置方式:

  1. <crontab>  
  2.        <jobs>  
  3.            <sitemap_generate>  
  4.                <run>  
  5.                    <model>sitemap/observer::scheduledGenerateSitemaps</model>  
  6.                </run>  
  7.            </sitemap_generate>  
  8.        </jobs>  
  9.    </crontab>  
About Us Portfolios Technical Competence News & Blog

Founded in 2008, EveBit Digital, a CMMI3 Certified Company, has grown to become one of China’s foremost eCommerce & Portal companies providing solution and development services.

As professionals, we specialize in delivering sophisticated Websites custom-designed to meet each client’s unique requirements using PHP, Magento, Joomla!, Drupal, WordPress, WeChat and Android / iOS for Internet Applications.

Under the guidance of our Certified Zend and Magento Engineers, we employ the very best web technologies available for Brand eCommerce, Cross-border eCommerce, O2O Platform, Content Management Systems (CMS) and Mobile Internet solutions.

CMS Experts

Our team provides full levels of CMS solutions from personal blog, small firm to portal and eCommerce. We are the few company in China, who delivered commerical projects for all the major PHP based CMS systems such as WordPress, Joomla!, TYPO3 and Drupal.

Web to Mobile solutions

Starting from PHP, covering web and mobile; we offer a complete suite of tools and services to cross-platform browsing experiences on CMS and eCommerce, we have helped clients deployed them not only on web, but also as android and iOS applications.

Magento Professionals

On the powerful eCommerce platform Magento, we offer an end-to-end service from stunning design to seamless integration with ERP and payment gateway. Five of developers passed the Magento Certified Developer, more than any company in China.

Zend Certified

We have a large team worked with Zend Framework in a number of different contexts, such as bespoke applications on enterprise-level projects for organisations and governments; some of our engineers passed the Zend Certified Engineer.

Scan for contact info

武汉伊锐数码技术开发有限公司  版权所有  鄂ICP备13005424号
Copyright © 2016 EveBit Digital            All Rights Reserved.