Answer the question
In order to leave comments, you need to log in
How to force a php script that is run by cron to be redirected?
Something I stuck not much.
It is required that the script that is launched by the
cron mypage.ru/cron.php
After the first 10 tasks are completed, it redirects to mypage.ru/cron.php?p=20
If I enter through the browser, then everything is fine. If I run it via cron, it doesn't work.
Are there any options?
Answer the question
In order to leave comments, you need to log in
1) You are probably doing a redirect through some kind of header('Location.... but it only works if you access the script through a browser, and do not execute it directly through cron.
2) Why do you even need this redirect when executing through cron? When executed from the console (from cron), there are (usually) no restrictions on the execution time of the script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question