M
M
MaoCzedun2019-12-23 12:50:09
Yii
MaoCzedun, 2019-12-23 12:50:09

Why is Cron not running a queue?

Good afternoon. I use queues for importing and exporting data to the database, as well as for other operations. I wrote Jobs. I queue jobs with one cron script, and then I start the yii queue/run queue. Everything worked fine for the time being. But a few days ago Cron stopped running the queue. As a result, the queue is only added to the database but not processed, I just can’t understand what’s wrong.
List of CRON tasks

## Images
## пушим джоб на загрузку изображений
*/2 * * * *	/usr/bin/wget -O - -q -t 1 http://alutis96.fvds.ru/autopillot/loading-images >/dev/null 2>&1
## Product
## джоб на обновление импорта
*/2 * * * *	/usr/bin/wget -O - -q -t 1 http://alutis96.fvds.ru/autopillot/update-sclad >/dev/null 2>&1
##  джоб на обновление экспорта
*/10 * * * * /usr/bin/wget -O - -q -t 1 http://alutis96.fvds.ru/autopillot/auto-export
## скрипт запуска очереди
*/10+1 * * * *  /var/www/www-root/data/www/alutis96.fvds.ru/queue.sh  > /var/www/www-root/data/www/queue.log

Contents of queue.sh
cd /var/www/www-root/data/www/alutis96.fvds.ru/
php yii queue/run

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MaoCzedun, 2019-12-24
@MaoCzedun

Guys, I found what was the matter, it turned out that the queue.sh file simply did not have permission to execute (the x flag was not set) and cron could not execute it, it's strange that nothing was written to the logs in this regard

V
vldud, 2019-12-23
@vldud

Does the cron log indicate that the task is running?
Does manually running queue.sh work? From under the same user for whom crontab was made?

S
Saboteur, 2019-12-24
@saboteur_kiev

1. View the log /var/www/www-root/data/www/queue.log
2. It is better to redirect via >> rather than via >, so that you add to the log instead of overwriting it every time.
3. Perhaps the script is frozen, and does not execute. Gotta watch what's in sh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question