P
P
PanDar2021-05-14 16:31:11
PHP
PanDar, 2021-05-14 16:31:11

Why doesn't yc work through crontab?

knotab - " * * * * * php /usr/share/asterisk/agi-bin/calling/token.php "

token file

exec('cd /usr/share/asterisk/agi-bin/calling
yc iam create-token > /usr/share/asterisk/agi-bin/calling/log2.txt');


nothing in log2.txt, if you run it through cron, if you run the file manually, then everything works, why doesn't it work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2021-05-14
@PanDar

what is the command
cd /usr/share/asterisk/agi-bin/calling /
why are there two paths?
what is the command
yc iam create-token > /usr/share/asterisk/agi-bin/calling/log2.txt
yc in PATH somewhere in your cron?

P
PanDar, 2021-05-14
@PanDar

I thank everyone who helped
The decision to specify the path to yc, in my case this code completed its task

exec('/root/yandex-cloud/bin/yc iam create-token > /usr/share/asterisk/agi-bin/calling/log2.txt');

Full path to YC

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question