F
F
freeeeez2016-12-22 12:06:07
Laravel
freeeeez, 2016-12-22 12:06:07

How to run CRON for route in Laravel?

Created a cron entry on the server
* * * * * root /usr/bin/php /home/artisan schedule:run >>/dev/null$
Earned schedule from Laravel, wrote a couple of DB queries - they are executed.
But I can't find anywhere how can I run the script?
I have an executable function on the /ajax/script route in the controller ajaxControlle.php
Or do I need to transfer it to a separate php file and run it? How to run correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Александр Аксентьев, 2016-12-22
@freeeeez

Функцию надо в расписание добавить, а не "вызывать роут".
https://laravel.com/docs/5.3/scheduling#defining-s...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question