M
M
mishkamartyshka2015-08-29 17:58:39
linux
mishkamartyshka, 2015-08-29 17:58:39

How to make cron run the same task in parallel at the same time?

There is a cron task that executes the script every minute, the script itself can run for more than a minute, and if this happens, the cron gives the following:

/bin/bash: line 1:14650 Killed python /script.py

It is important that the script is executed every minute.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
chupasaurus, 2015-08-29
@chupasaurus

Wrap in nohup script launch.

O
Oleg Shevelev, 2015-08-29
@mantyr

It is better to use start-stop-daemon in order not to wait for the end of execution.
Are you sure this is what cron is giving you? Maybe it's the python script itself that sees that the copy is already running and kills itself or kills the previous copy. In a normal script, cron only runs (and arbitrary) commands for execution.
Test on another program.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question