P
P
Peter2015-11-13 11:49:08
Yii
Peter, 2015-11-13 11:49:08

How to run script in yii from cron?

Problem following: everything is already implemented and works. When called from the console ./yii foo everything works. And from krone does not work.
I've tried with and without php.
*/1 * * * * /var/www/callx-site/yii foo
*/1 * * * * /usr/bin/php /var/www/callx-site/yii foo

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osin, 2015-11-13
@Telsir

Is the shell indicated at the beginning of the script?
If that doesn't work, write sh which will call your script, which you can run normally by hand and feed the sh cron.
There is a good article on bashscriptin on the opennet.
Google "Advanced bash scripting"

V
Valentine, 2015-11-13
@gephaest

Check permissions, in particular the flag to execute (x), as well as the owner of the file (whether the user is running the script)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question