O
O
Oleg Krivchenko2018-12-27 05:17:49
Task Schedulers
Oleg Krivchenko, 2018-12-27 05:17:49

Why are more than two commands not processed sequentially?

crontab does not process php file execution sequences. Between them is a command to delete a file, it is the second one, followed by a php script that is not being processed. The feeling that crontab works with just two commands.
PS: The sequence is separated by &&.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2018-12-28
@rvs_ie

cron executes binaries and knows nothing about `&&`.
It is possible to run a command shell which already pass a mini-script with `&&`, for example:/bin/sh -c "command1 && command2"

O
Oleg Krivchenko, 2018-12-29
@Oleg_1970

The answer is found: the matter is in absolute paths. It was necessary to specify the full path from php and it all worked. Thanks to all!!!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question