Answer the question
In order to leave comments, you need to log in
How is this line decoded by cron?
Hello.
Can you please tell me how this string is decoded?
(about the fact that it starts every minute, with root rights, then the script is apparently launched (but there is no path to php, it just goes further) and what are the curly brackets?
What does 2>&1 mean ?
* * * * * root test -f /home/bitrix/www/hook/log.php?test=1 && { /usr/bin/php -f /home/bitrix/www/hook/log.php?test=1; } > /dev/null 2>&1
Answer the question
In order to leave comments, you need to log in
test -f /home/bitrix/www/hook/log.php?test=1
- check that the file exists
&&
- if the first command succeeds (i.e. when the file exists), execute the second
{ ...; }
- output grouping, I don't know why it is here, given that there is only one command in brackets. Possibly an artifact, and there used to be a few commands
/usr/bin/php -f /home/bitrix/www/hook/log.php?test=1;
- execute file - redirect command output to / dev > /dev/null
/null (i.e. ignore) 2>&1
in short, so that all program output ends up in / dev / null
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question