Answer the question
In order to leave comments, you need to log in
Running a script via cron?
Good day, please tell me if I run a php script via cron, the script is long, lasts 3-7 minutes (Sending letters to the database), so the limitation stated in nginx and php-fpm will not work through cron, before that I ran it by link to the script and it gave 504 time out ?
And do it through cron through curl and then a link to the script?
Or is it possible to do this without a cron before the link so that there would not be a 504 timeout?
Answer the question
In order to leave comments, you need to log in
You don't really need a web part. Run the script via cron as a local command:/usr/bin/php script.php
When running from cron on a direct path to the script, there will be no timeout.
Also use set_time_limit() in a script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question