简体   繁体   English

运行任务计划程序Laravel

[英]Running Task scheduler Laravel

I am currently on a project which requires me to send emails to registered users, and i implemented the queuing method, it works fine when i am on my localhost running artisan commands. 我目前正在一个项目中,该项目需要我向注册用户发送电子邮件,并且实现了排队方法,当我在运行artisan命令的本地主机上时,它可以正常工作。 And i tried to step it up to use a development server Heroku, but i find it pretty hard to do. 我试图加强它以使用开发服务器Heroku,但我发现这很难做到。 Went to the laravel docs and added the cron entry then scheduled my artisan command, but it does not still process. 去了laravel文档并添加了cron条目,然后安排了我的artisan命令,但是它仍然无法处理。

//code
* * * * * php /path/to/artisan schedule:run 1>> /dev/null 2>&1

My questions are 1. Is the path/to actually suppose to be the path to my project ie project folder name?? 我的问题是1.该路径/实际是否应该是我的项目的路径,即项目文件夹名称? 2. If not is there an alternative way to run this. 2.如果没有,可以使用另一种方法来运行它。 Thanks to you all 谢谢大家

Yes, path to artisan is the full path to your project directory. 是的,工匠的路径是项目目录的完整路径。 This has the artisan executable in it. 里面有工匠可执行文件。

I am not aware of another way to run the scheduler. 我不知道另一种运行调度程序的方法。 Cron is a reliable way to do these types of things. Cron是执行此类事情的可靠方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM