Похожие чаты

Hey guys Why my cron job not working? root@debian:~# grep CRON

/var/log/syslog | grep test
Sep 16 12:45:01 debian CRON[16802]: (root) CMD (docker exec -it test-scripts python /app/cron.py)
Sep 16 12:46:01 debian CRON[16955]: (root) CMD (docker exec -it test-scripts python /app/cron.py)
Sep 16 12:47:01 debian CRON[17136]: (root) CMD (docker exec -it test-scripts python /app/cron.py)
cron.py inserts a record in db this is the only task it does, In logs it seems like it runs but nothing inserted into my db
When I run this command it works:
docker exec -it test-scripts python /app/cron.py

16 ответов

6 просмотров

command in crontab usually require full path, eg. /bin/docker unless you configure PATH command before the application command itself

and why you need to run the cron every minute?

Ehsan- Автор вопроса
Sharuzzaman Ahmat Raslan
and why you need to run the cron every minute?

It's just for test to find out what's the problem otherwise I have to wait an hour to see the result 😅

Ehsan
Didn't work

what is the error message?

Ehsan- Автор вопроса
Sharuzzaman Ahmat Raslan
what is the error message?

No error this is the last log Sep 16 13:06:01 debian CRON[20310]: (root) CMD (/bin/docker exec -it test-scripts python /app/cron.py)

Ehsan- Автор вопроса
Sharuzzaman Ahmat Raslan
are you sure docker is in /bin?

this command works in command line: /bin/docker exec -it test-scripts python /app/cron.py

Ehsan- Автор вопроса
Ehsan- Автор вопроса
Kiyo 💜
whereis docker

I did it `/bin/docker exec -it test-scripts python /app/cron.py`

Ehsan- Автор вопроса
Kiyo 💜
that's not the output of whereis docker

root@d5276e1aaf26:/app# whereis docker docker:

Ehsan
root@d5276e1aaf26:/app# whereis docker docker:

why you are running the whereis command inside the container?

Ehsan- Автор вопроса
Sharuzzaman Ahmat Raslan
why you are running the whereis command inside the...

sorry my mistake root@debian:~# whereis docker docker: /usr/bin/docker /etc/docker /usr/libexec/docker /usr/share/man/man1/docker.1.gz

Похожие вопросы

Обсуждают сегодня

А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
I arrived here after a Chico Crypto show highlighted the project & the Team - the fact that the Team had a long history of successfully working with household names gave me e...
Banter is Bullish
1
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
Подскажите, где смотреть результат выполнения программы? Код: ;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, станда...
Егор Анелькин
5
Где в Астане можно купить мясо для шашлыков?
Dancing Іңұқәһүғө
21
Lers say somehow tor got shut down What then?
Mark Keller
16
Добрый день подскажите пожалуйста может кто то сталкивался с ошибками Sentry 22.10.0 развернутым из helm чарт в Kubernetes? Изначально 3 дня назад очень стало много событий ух...
Tire4 Finist Devops
1
Ну чё, сегодня все в гавно?))
ᅠ🚀
20
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
Карта сайта