R
R
Roman2017-04-04 12:45:58
PHP
Roman, 2017-04-04 12:45:58

Cron job crashes with an error.?

I add a task via ISP with sending the result to soap.
This comes up:
/bin/sh: 1: /var/www/PATH-TO-FILE/cron.php: not found
I run it manually from ISP - the result is the same.
In the php script itself, at the beginning I wrote:
#!/usr/bin/php
There is no include or require in the script.
The rights to the script are root\777.
The script itself pulls the euro rate from cbr.ru and writes to the database. I checked it through the browser - everything is fine, i.e. syntax errors are excluded.
What's wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
res2001, 2017-04-04
@res2001

Most likely there are no rights, perhaps not to the script itself, but to the overlying directories.

A
Alexey Budaev, 2017-04-04
@Markus_Kane

Judging by the text of the error, the file was not found. If there was a problem with the rights, then the error would be that you do not have enough rights. Check the file path. It is possible that you made a typo.

D
display: block, 2017-04-04
@qork

Try to output the directory directly in the script, open it in a browser and check the path in the cron. UPD You can run the script with wget
/usr/bin/wget domain.com/cron.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question