A
A
Alexey2015-08-21 01:21:05
Debian
Alexey, 2015-08-21 01:21:05

CRON not working: /bin/sh: 1: Syntax error: Bad fd number. Where to dig?

Goodnight.
Instruction: /usr/bin/php file.php >/dev/null 2>&1
The mail comes: /bin/sh: 1: Syntax error: Bad fd number
The error is visible in the output redirection, namely &1, but how to fix it I don't understand. I put SHELL=/bin/bash at the beginning - I get: /bin/bash:1: ambiguous redirect
Yasha and Google say little, except for dumb manipulations with rm /bin/sh.
Please, help. I lifted everything (seemingly), but the kroner does not work in any way.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-08-21
@coderofbig

so your script rises without a terminal, therefore neither STDERR nor STDOUT are created. What are you redirecting?

A
amadshock, 2021-08-27
@amadshock

Explain to me, fool, what does "the script rises without a terminal" mean?
Same problem, cron refuses to do anything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question