L
L
Leonid Nimchenko2018-05-14 22:27:07
linux
Leonid Nimchenko, 2018-05-14 22:27:07

Why does the cron error occur?

Hello.
Created a task for the scheduler on the customer's dedicated server:

php /var/www/site/data/www/site.by/kopirka/copy_onliner_cron_site.php > /var/www/site/data/www/site.by/kopirka/log.html &&

After executing the cron, an error comes up in the mail:
/bin/sh: -c: line 1: syntax error: unexpected end of file

Tell me, please, what could be the error, or at least in which direction to dig? I have not run cron on dedicated servers before and I don’t understand unix systems yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-05-14
@lculver

php /var/www/site/data/www/site.by/kopirka/copy_onliner_cron_site.php > /var/www/site/data/www/site.by/kopirka/log.html &&

One "&" is needed.
And either the full path to php, or the path to php in the PATH variable in crontab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question