Skip to content
Advertisement

Script takes parameters from the previous run

I am using docker container that runs Alpine Linux.It runs some bash script async

JavaScript

The first time it runs it seems it does nothing it should write to some database but when I run it second time

JavaScript

It does work but it use parameters from the previous run i.e param1 and param2.

Without &>/dev/null &disown it works fine from the first time

Could someone explain to me such behaivour

Advertisement

Answer

The solution was to add a delay

JavaScript

Probably because it async the script finishes too fast But I would like to hear in depth explanation

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement