magento2 cron not reindex

时间:2016-02-25 18:23:18

标签: magento2 magento-2.0

我在Ubuntu Server和Plesk 12.5中使用此命令创建了一个crontab:

MAILTO=""
SHELL="/bin/bash"
*/1 *   *   *   *   php -c -f /var/www/vhosts/system/domainname.com/etc/php.ini /var/www/vhosts/domainname.com/httpdocs/store/bin/magento cron:run > /var/www/vhosts/domainname.com/httpdocs/store/var/log/magento.cron.log&
MAILTO=""
SHELL="/bin/bash"
*/1 *   *   *   *   php -c -f /var/www/vhosts/system/domainname.com/etc/php.ini /var/www/vhosts/domainname.com/httpdocs/store/update/cron.php > /var/www/vhosts/domainname.com/httpdocs/store/var/log/update.cron.log&
MAILTO=""
SHELL="/bin/bash"
*/1 *   *   *   *   php -c -f /var/www/vhosts/system/domainname.com/etc/php.ini /var/www/vhosts/domainname.com/httpdocs/store/bin/magento setup:cron:run > /var/www/vhosts/domainname.com/httpdocs/store/var/log/setup.cron.log&

运行时会创建三个文件(magento.cron.log; update.cron.log; setup.cron.log)。三个文件包含相同的文字:

  

注意! ; ;请勿修改此文件,因为它已生成   自动地,;所以你的所有变化都将在下一次失去   文件已生成。

     

[PHP] soap.wsdl_cache_limit = 5 cli_server.color = On   mysql.allow_persistent = On mysqli.max_persistent = -1   mysql.connect_timeout = 60 session.use_only_cookies = 1   register_argc_argv =关闭mssql.min_error_severity = 10 open_basedir =   " /var/www/vhosts/mydomainname.com /:/ TMP /" session.name = PHPSESSID   mysqlnd.collect_statistics =在session.hash_function = 0   session.gc_probability = 0 log_errors_max_len = 1024   mssql.secure_connection =关闭pgsql.max_links = -1 variables_order =   " GPCS" ldap.max_links = -1 sybct.allow_persistent =在max_input_time上   = 60 odbc.max_links = -1 session.save_handler = files session.save_path =" / var / lib / php5" mysqli.cache_size = 2000   pgsql.auto_reset_persistent =关闭error_reporting = E_ALL&   ~E_DEPRECATED& ~E_STRICT auto_prepend_file =   sybct.min_client_severity = 10 pgsql.max_persistent = -1   auto_globals_jit = On soap.wsdl_cache_ttl = 86400 allow_url_fopen = On   zend.enable_gc = On mysqli.allow_persistent = On tidy.clean_output =   关闭display_startup_errors =关闭user_dir = session.cookie_lifetime =   0 mysqli.max_links = -1 default_socket_timeout = 60   session.serialize_handler = php session.hash_bits_per_character = 5   unserialize_callback_func = pdo_mysql.cache_size = 2000   default_mimetype =" text / html" session.cache_expire = 180   max_execution_time = 30 mail.add_x_header = On upload_max_filesize =   2M ibase.max_links = -1 zlib.output_compression = Off   ignore_repeated_errors = Off odbc.max_persistent = -1 file_uploads =   在ibase.max_persistent = -1 mysqli.reconnect = Off   mssql.allow_persistent = On mysql.max_persistent = -1 mssql.max_links   = -1 session.use_trans_sid = 0 mysql.default_socket = always_populate_raw_post_data = -1 mysql.max_links = -1   odbc.defaultbinmode = 1 sybct.max_persistent = -1 output_buffering =   4096 ibase.timeformat ="%H:%M:%S" doc_root = log_errors = On   mysql.default_host = default_charset =" UTF-8" request_order =" GP"   display_errors = Off mysqli.default_socket = mysqli.default_pw =   html_errors = On mssql.compatibility_mode = Off ibase.allow_persistent   = 1 sybct.min_server_severity = 10 mysql.allow_local_infile = On post_max_size = 8M asp_tags = Off memory_limit = 512M short_open_tag =   关闭SMTP = localhost precision = 14 session.use_strict_mode = 0   session.gc_maxlifetime = 1440 allow_url_include =关闭   mysqli.default_host = mysqli.default_user = session.referer_check =   pgsql.log_notice = 0 mysql.default_port = pgsql.ignore_notice = 0   mysql.trace_mode = Off ibase.timestampformat ="%Y-%m-%d%H:%M:%S"   engine = On odbc.allow_persistent = On ibase.dateformat ="%Y-%m-%d"   track_errors = Off max_file_uploads = 20 pgsql.allow_persistent = On   session.auto_start = 0 auto_append_file = disable_classes =   pdo_mysql.default_socket = mysql.default_password =   url_rewriter.tags =   " = HREF,面积= HREF,帧= SRC,输入= SRC,形成= fakeentry" smtp_port = 25   sql.safe_mode = Off session.cookie_path = / expose_php = On   report_memleaks =在session.gc_divisor = 1000 mssql.max_persistent =   -1 serialize_precision = 17 odbc.check_persistent = On sybct.max_links = -1 mysqlnd.collect_memory_statistics = Off session.cookie_domain = session.cookie_httponly = session.cache_limiter = nocache enable_dl =   关闭mysqli.default_port = 3306 disable_functions = odbc.defaultlrl =   4096 soap.wsdl_cache_enabled = 1 soap.wsdl_cache_dir =" / tmp"   mssql.min_message_severity = 10 session.use_cookies = 1   mysql.default_user = mysql.cache_size = 2000 implicit_flush = Off   ignore_repeated_source =关闭bcmath.scale = 0

但是,当我进入洋红色经理时,不断发出消息"一个或多个索引器无效。确保您的Magento cron作业正在运行。"

我不明白。什么是不起作用?

由于

1 个答案:

答案 0 :(得分:0)

你错了flags for php。它应该是

*/1 *   *   *   *   php -c /var/www/vhosts/system/domainname.com/etc/php.ini -f /var/www/vhosts/domainname.com/httpdocs/store/bin/magento cron:run > /var/www/vhosts/domainname.com/httpdocs/store/var/log/magento.cron.log&

还提供了php的完整路径,可以通过which php命令找到它。