【发布时间】:2016-03-19 11:56:02
【问题描述】:
我编写了一个 shell 脚本,当我在本地测试它时,它可以完美运行。
bin/cake myshell method
但是当我将它分配为 crob 时,它不起作用。相反,我看到了默认的蛋糕输出:
Welcome to CakePHP v3.1.4 Console
---------------------------------------------------------------
App : src
Path: /home/fantastagram/public_html/src/
PHP : 5.6.16
---------------------------------------------------------------
Current Paths:
* app: src
* root: /home/fantastagram/public_html
* core: /home/fantastagram/public_html/vendor/cakephp/cakephp
Available Shells:
[Migrations] migrations
[CORE] i18n, orm_cache, plugin, routes, server
[app] console, instagram
To run an app or core command, type `cake shell_name [args]`
To run a plugin command, type `cake Plugin.shell_name [args]`
To get help on a specific command, type `cake shell_name --help`
Content-type: text/html; charset=UTF-8
脚本的两个参数似乎被忽略了。我正在使用 cPanel 中的 cron 作业工具...
我做错了什么?
【问题讨论】: