2017-07-23 64 views
0

我面臨的問題是訂單電子郵件不能在我的magento商店中工作。我安裝了AOE調度程序,但是我收到此問題Cron工作問題Magento

找不到心跳任務。檢查cron是否配置正確。

雖然我在的cPanel設置的設置上Magento的 enter image description here

和AOE調度設置 enter image description here

我得到這個電子郵件每一秒

Available actions: 
    --action listAllCodes 
    --action lastRun --code <code> [--secondsFromNow] Get the timestamp of the last successful run of a job for a given code 
    --action scheduleNow --code <code> Schedule a job to be executed as soon as possible 
    --action runNow --code <code> [--tryLock] [--force]   Run a job directly 
    --action wait [--timout <timeout=60>]    Active wait until no schedules are running. 
    --action flushSchedules --mode (future|all)   Flush schedules. 
    --action listAllRunningSchedules 
    --action killAll 
    --action watchdog 
    --action cron --mode (always|default) [--includeJobs <comma separated list of jobs>] [--excludeJobs <comma separated list of jobs>] [--includeGroups <comma separated list of groups>] [--excludeGroups <comma separated list of groups>] 

我堅持我不知道如何解決這個問題,請幫忙

+0

我投票關閉這一問題作爲題外話,因爲Stack Overflow是一個[編程相關(http://stackoverflow.com/help/on -topic)問答網站。你的問題不是關於編程。也許你應該在http://magento.stackexchange.com上發佈它呢? – Enigmativity

回答

0

https://magento.stackexchange.com/questions/186044/cron-jobs-for-order-emails?noredirect=1#comment257244_186044

貌似PATH變量被設置在jailshelled的cron環境有些不同。所以我想使用不同的php二進制文件。你可以ssh到你的cPanel帳戶並在你的crontab中設置PATH。

所以crontab的應該這樣開始:

SHELL=/bin/sh 
PATH=/usr/local/jdk/bin:/usr/local/bin:/usr/bin:/opt/cpanel/composer/bin:/usr/local/bin:/usr/X11R6/bin:/home/username/.local/bin:/home/username/bin 
-1

這是Magento 2文檔中隱藏的內容。一旦你安裝Magento 2與作曲家,你沒有完成安裝。需要在/ update /文件夾下運行,然後再次運行composer update,以便安裝一些所需的軟件包以使cron正常工作。

我見過很多Magento2設置,這個額外的步驟沒有完成,因此除了cron之外,一切都可以工作。

如果使用命令行,就應該是這樣的:

[html]$ cd update/ 
[update]$ composer update 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
Package operations: 29 installs, 0 updates, 0 removals 
    - Installing psr/log (1.0.2): Loading from cache 
    - Installing monolog/monolog (1.16.0): Loading from cache 
    - Installing symfony/yaml (v2.8.25): Loading from cache 
    - Installing sebastian/version (1.0.6): Loading from cache 
    - Installing sebastian/recursion-context (1.0.5): Loading from cache 
    - Installing sebastian/exporter (1.2.2): Loading from cache 
    - Installing sebastian/environment (1.3.8): Loading from cache 
    - Installing sebastian/diff (1.4.3): Loading from cache 
    - Installing sebastian/comparator (1.2.4): Loading from cache 
    - Installing doctrine/instantiator (1.0.5): Loading from cache 
    - Installing phpunit/php-text-template (1.2.1): Loading from cache 
    - Installing phpunit/phpunit-mock-objects (2.3.8): Loading from cache 
    - Installing phpunit/php-timer (1.0.9): Loading from cache 
    - Installing phpunit/php-file-iterator (1.3.4): Loading from cache 
    - Installing phpunit/php-token-stream (1.4.11): Loading from cache 
    - Installing phpunit/php-code-coverage (2.2.4): Loading from cache 
    - Installing phpunit/phpunit (4.1.0): Loading from cache 
    - Installing symfony/console (v2.6.13): Loading from cache 
    - Installing symfony/process (v3.3.5): Loading from cache 
    - Installing symfony/finder (v3.3.5): Loading from cache 
    - Installing symfony/filesystem (v3.3.5): Loading from cache 
    - Installing seld/phar-utils (1.0.1): Loading from cache 
    - Installing seld/jsonlint (1.6.1): Loading from cache 
    - Installing seld/cli-prompt (1.0.3): Loading from cache 
    - Installing justinrainbow/json-schema (1.6.1): Loading from cache 
    - Installing composer/spdx-licenses (1.1.6): Loading from cache 
    - Installing composer/semver (1.4.2): Loading from cache 
    - Installing composer/composer (1.0.0-beta1): Loading from cache 
    - Installing magento/composer (1.0.3): Loading from cache 
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) 
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) 
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server) 
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) 
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome) 
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server) 
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) 
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) 
monolog/monolog suggests installing videlalvaro/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) 
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1) 
symfony/console suggests installing symfony/event-dispatcher() 
Writing lock file 
Generating autoload files 
[update]$ 
+0

我沒有使用magento 2 –

+0

在Magento 1中 - 大多數cron問題與文件權限有關,或者某個模塊發生嚴重錯誤,所以它會使cron在中途崩潰。 – Ron