西蒙和梅勒的CRON工作



我正在尝试设置一个CRON作业,使用Symfony命令向用户发送电子邮件。电子邮件部分有效。如果我在正确的目录中键入命令,我就会收到我的电子邮件。

所以我想出了这个CRON命令:cd/home/c158306c/public_html&php-bin/console应用程序:发送电子邮件:发送

但当命令被执行时,Symfony似乎没有认出我的命令,这是输出:

Symfony 5.2.3 (env: dev, debug: true)
Usage:
command [options] [arguments]
Options:
-h, --help            Display help for the given command. When no command is given display help for the list command
-q, --quiet           Do not output any message
-V, --version         Display this application version
--ansi            Force ANSI output
--no-ansi         Disable ANSI output
-n, --no-interaction  Do not ask any interactive question
-e, --env=ENV         The Environment name. [default: "dev"]
--no-debug        Switches off debug mode.
-v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about                                      Displays information about the current project
help                                       Displays help for a command
list                                       Lists commands
app
app:send-email:send                 My test command
assets
assets:install                             Installs bundles web assets under a public directory
cache
cache:clear                                Clears the cache

我做错什么了吗?

注意:我必须指定到文件夹。否则,这将是输出:

状态:404未找到X-Powered-Bor:PHP/7.4.15内容类型:text/html;charset=UTF-8

未指定输入文件。

我的网站管理员找到了解决方案,但没有告诉我为什么它不起作用。

解决方案:

/usr/local/bin/php/home/c158306c/public_html/bin/console app:mail

最新更新