Gekko Forum
Howto: auto re-run Gekko on crash - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: Guides (https://forum.gekko.wizb.it/forum-22.html)
+--- Thread: Howto: auto re-run Gekko on crash (/thread-56577.html)



Howto: auto re-run Gekko on crash - xFFFFF - 03-18-2018

Sometimes it happens that some error will occur in Gekko and the program will turn off, for example when we have runned Gekkos live trade. 

We can overcome this by simply loops in Bash.
Code:
#!/bin/bash
for i in {1..10}
do
$1
done
1. Save above code to loop.bash file and copy to Gekko directory.
2. $ chmod +x loop.bash
3. $ ./loop.bash "node gekko -c config.js"

After turning off Gekko, the script will launch Gekko again. He will repeat the action 10 times.


RE: Howto: auto re-run Gekko on crash - ankasem - 03-18-2018

thank you
how does it work for (ui) mod


RE: Howto: auto re-run Gekko on crash - xFFFFF - 03-21-2018

It dont working for UI Live Trader only for CLI.


RE: Howto: auto re-run Gekko on crash - ankasem - 03-21-2018

thank you

I found the following command

forever start -a ~/gekko/gekko.js --ui
forever stop ~/gekko/gekko.js --ui

-a flag is to keep a log.


RE: Howto: auto re-run Gekko on crash - Kris191 - 04-03-2018

Hi guys, i cant get either of these to work and Gekko crashes out at 5am each morning for reasons unknown, any other solutions for tit o auto connect for me?


RE: Howto: auto re-run Gekko on crash - Kaieysen - 07-02-2020

When you will do it wrong you will find a crash or error on the front page. When you found it you must get paper now review to fix this error by paying some money.


RE: Howto: auto re-run Gekko on crash - TonyV152 - 09-07-2020

Where do i find "loop.bash" file?
I'm using operating system "Raspian" on a Raspberry Pi.

Thanks


RE: Howto: auto re-run Gekko on crash - GeorgeS - 09-08-2020

Cool! thanks