A
A
alex_6zx2021-04-21 13:55:57
ubuntu
alex_6zx, 2021-04-21 13:55:57

Crontab and killall celery. How to make it work?

It is necessary to kill the celery processes with a certain frequency.
This is how the processes themselves look like:
608003a3cd812300122418.png

I tried this:

* */1 * * * bash /home/krakenadmin79/kill_celery.sh  &>/dev/null

and so
60800419316ff295665459.jpeg
in the script it was
killall celery

giving the script rights through the chmod +x /home/krakenadmin79/kill_celery.sh

restart of cron did
/etc/init.d/cron restart

ubuntu 18 installed on the server.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Shatokhin, 2021-04-21
@alex_6zx

Replace killall in the script with /usr/bin/killall
Well, or figure out the PATH in the cron.

S
Sergey Tikhonov, 2021-04-21
@tumbler

https://docs.celeryproject.org/en/stable/userguide...
https://docs.celeryproject.org/en/stable/userguide...
You can rotate automatically by the number of tasks and memory.
I'm not sure that the code of absolutely all tasks in the project is ready to be killed at an arbitrary moment in time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question