Answer the question
In order to leave comments, you need to log in
Why are requests to VK api not executed via Cron?
There is a PHP code that, using the VK api, gets the number of friends of the desired user and makes an entry in the database.
The code works fine because I turn to the script through the browser and it does everything as it should.
I put the script in the list of cron tasks and realized that it does not fulfill requests to api vk, because. the line appears in the database, but the number of friends is 0.
Tell me how to solve the problem?
Answer the question
In order to leave comments, you need to log in
Colleague, check if the code uses environment variables?
Look at the php errorlog
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question