Bitcoin Forum
May 23, 2024, 09:00:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: How to repeat the same command automatically in Linux?  (Read 199 times)
BTC Turkiye (OP)
Sr. Member
****
Offline Offline

Activity: 472
Merit: 254


Anlik Coin Fiyatlari BTCkur.com


View Profile WWW
March 10, 2018, 07:50:43 AM
 #21

I`m so close to succeed in this solution right now, I don`t want to start another way to do this now to be honest.

Farklı Borsaların Anlık Bitcoin, Litecoin, Ethereum ve Bitcoin Cash Kurunu Takip Edebilirsiniz.
BTCkur.com
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
March 10, 2018, 08:09:09 AM
 #22

Why don't you try to put it into crontab with /home/kullanici/restart_script.sh?

I thought you had it working with cron already?

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
BTC Turkiye (OP)
Sr. Member
****
Offline Offline

Activity: 472
Merit: 254


Anlik Coin Fiyatlari BTCkur.com


View Profile WWW
March 10, 2018, 08:12:00 AM
 #23

No. I was running it from it`s destination. I have never put anything in cron before and I checked it out but couldn`t get it to work when I write
crontab * * * * * /home/kullanici/restart_script.sh

It says app: Not a regular file

Farklı Borsaların Anlık Bitcoin, Litecoin, Ethereum ve Bitcoin Cash Kurunu Takip Edebilirsiniz.
BTCkur.com
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
March 10, 2018, 09:24:20 AM
 #24

How about doing a little research first? There are tons of tutorials on how to add a crontab entry.
You need to learn how to handle the basics of your Linux install if you want to rely on it.

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
BTC Turkiye (OP)
Sr. Member
****
Offline Offline

Activity: 472
Merit: 254


Anlik Coin Fiyatlari BTCkur.com


View Profile WWW
March 10, 2018, 11:07:48 PM
 #25

I did. That`s why I tried that crontab command first. I did a lot of research and tried multiple commands but none of them worked for me. I know I`m a n00b and I shouldn`t ask for the basics but believe me I really research these things before I come here and ask for it.

That`s why first I tried to put the file in the cron.hourly folder and it didn`t work. Then I tried to run it from there and it didn`t work and then put the crontab command and it still didn`t work. Please don`t think that I`m looking for the basic and easy to find info here.

Farklı Borsaların Anlık Bitcoin, Litecoin, Ethereum ve Bitcoin Cash Kurunu Takip Edebilirsiniz.
BTCkur.com
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
March 11, 2018, 08:57:10 AM
 #26

A few hints/ideas:
- cron runs as its own user with its own ENV, so $PATH etc differs from other users
- try running it in cron as your own user (kullanici)
- cd into your homedir before trying to start the bot since it seems unable to find modules ("No module named Trading")
- set the directory for the modules (PYTHONPATH or sys.path.append)

If you know someone who is good with Linux, let him have a look directly at your system. It's hard to debug something if you cannot do anything yourself.
Only let that do someone you really trust and look over his shoulder to see what he is doing at any time.


Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
BTC Turkiye (OP)
Sr. Member
****
Offline Offline

Activity: 472
Merit: 254


Anlik Coin Fiyatlari BTCkur.com


View Profile WWW
March 11, 2018, 09:04:34 AM
 #27

A few hints/ideas:
- cron runs as its own user with its own ENV, so $PATH etc differs from other users
- try running it in cron as your own user (kullanici)
- cd into your homedir before trying to start the bot since it seems unable to find modules ("No module named Trading")
- set the directory for the modules (PYTHONPATH or sys.path.append)

Thank you. Will try...
Quote
If you know someone who is good with Linux, let him have a look directly at your system. It's hard to debug something if you cannot do anything yourself.
Only let that do someone you really trust and look over his shoulder to see what he is doing at any time.

That`s the reason I`m writing here instead of getting someone to look at my screen. I kinda have to do this all by myself but I keep getting smashed on my face, get up and try again

Farklı Borsaların Anlık Bitcoin, Litecoin, Ethereum ve Bitcoin Cash Kurunu Takip Edebilirsiniz.
BTCkur.com
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!