A
A
Azat Kiberov2018-12-07 21:20:14
Task Schedulers
Azat Kiberov, 2018-12-07 21:20:14

Why doesn't cron work when I run a curl script?

I wanted to create a cron associated with curl I
created a php file inside which is curl with sending a post request.
It looks like site.ru/cron.php
When I run it from the browser, the script sends the data and it works.
Created cron put link site.ru/cron.php run every minute..
Waited 1 minute nothing happened 2 minutes nothing. What could be wrong.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
beerchaser, 2018-12-07
@beerchaser

Did you specify an interpreter for the script?
The line in the cron should look like
* * * * * user /path_to_interpreter/php /path_to_script/cron.php
It also makes sense to look in /var/log/syslog if the logging path is not redefined...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question