Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How can I run code 24/7 without having to leave my pc on?

Link to post
Share on other sites
3 minutes ago, Wictorian said:

How can I run code 24/7 without having to leave my pc open?

You mean on? You can't.

So rise up, all ye lost ones, as one, we'll claw the clouds

Link to post
Share on other sites
15 minutes ago, Wictorian said:

How can I run code 24/7 without having to leave my pc open?

You get a cloud provider to run it for you, or get another device such as a raspberry pi to leave it on in your home.

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to post
Share on other sites
1 minute ago, igormp said:

raspberry pi

This right here is probably one of your best options for running code 24/7. Raspberry Pi's have a bunch of different models and options and are great for most coding needs.

Link to post
Share on other sites
2 hours ago, Wictorian said:

How can I run code 24/7 without having to leave my pc open?

As other's have sort of asked...do you mean leaving your pc on?  If so, then the answer is no...unless you do a cloud service provider.

 

If you mean without it being open to attack, then it depends what you are running (like a webservice etc).

 

Any chance at clarifying what you are trying to run?  There might be other alternatives/solutions than 24/7

3735928559 - Beware of the dead beef

Link to post
Share on other sites
9 hours ago, wanderingfool2 said:

As other's have sort of asked...do you mean leaving your pc on?  If so, then the answer is no...unless you do a cloud service provider.

Yeah, leave it on, and I know I need a cloud service provider. I was actually asking which clud service provider. I am not trying to run something too complcitadei but it would do executions every second and I won't give input or get output.

Link to post
Share on other sites
49 minutes ago, Wictorian said:

I was actually asking which clud service provider.

AWS and Azure come to mind. Or OVH Hosting, for example.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to post
Share on other sites

Strong security not required, latency sensitive, and best run locally - Pi or even microcontroller like Arduino


Running code in secure environment and does not require very low latencies (unless of course if you have a super high speed 500+ down/50+ up mbps internet connection) - "Cloud server" service providers such as IBM, Azure, or even something like this by Google is a good idea, especially as it's best practice to leave the "security up to the experts" so to speak unless if you know exactly what you're doing.  I'm not a big fan of Amazon myself but tbh I've never used AWS so I can't attest to how secure it is compared to other "cloud server" service providers.

Link to post
Share on other sites

Also feel free to elaborate on specifics of what you're trying to achieve (if you want) as it will help others and I give you more specific/helpful recommendations as to how to run code 24/7 without having to leave your personal laptop/desktop computers on all the time.

Link to post
Share on other sites
5 minutes ago, linuxChips2600 said:

Also feel free to elaborate on specifics of what you're trying to achieve (if you want) as it will help others and I give you more specific/helpful recommendations as to how to run code 24/7 without having to leave your personal laptop/desktop computers on all the time.

I'm actually building a trading bot but I didn't want to specify it because I could use it to do other things in the future.

Link to post
Share on other sites
4 hours ago, Wictorian said:

I am not trying to run something too complcitadei but it would do executions every second and I won't give input or get output.

I think this can be done with time triggered Serverless Functions really cheap or even for free.  They're called lambdas on AWS i believe.

2 trigger/min * 60 mins * 24 hours * 31 days = 89 280 invocations/month. This should fit into the always free category.

 

 

ಠ_ಠ  if i said something stupid please let me know

Link to post
Share on other sites
13 hours ago, Wictorian said:

I'm actually building a trading bot but I didn't want to specify it because I could use it to do other things in the future.

Then I'd recommend the Pi approach (at least specifically for the trading bot) even more just based off of this post I'd made recently (make sure to check out the github page I'd linked in the beginning of that post):

 

However, feel free to still use a Cloud-based solution instead if the trading bot doesn't need to be particularly latency-sensitive.
 

Link to post
Share on other sites
10 hours ago, linuxChips2600 said:

Then I'd recommend the Pi approach (at least specifically for the trading bot) even more just based off of this post I'd made recently (make sure to check out the github page I'd linked in the beginning of that post):

 

However, feel free to still use a Cloud-based solution instead if the trading bot doesn't need to be particularly latency-sensitive.
 

Does cloud machines have more latency? Why? 
 

I don't wanna use a PI because sometimes blackouts can happen here and it could easily cause me a lot of loss in trading.

Link to post
Share on other sites
27 minutes ago, Wictorian said:

Does cloud machines have more latency? Why?

Virtualization and shared resources like vCPU

ಠ_ಠ  if i said something stupid please let me know

Link to post
Share on other sites
16 hours ago, Wictorian said:

I don't wanna use a PI because sometimes blackouts can happen here and it could easily cause me a lot of loss in trading.

So in that case hookup your Pi to a decent UPS (and since Pi's don't consume a lot of power a good quality one for like $60-ish will do the job just fine), and if that still doesn't solve the issue then yes you'll definitely have to use a cloud service solution.

Link to post
Share on other sites
1 minute ago, linuxChips2600 said:

So in that case hookup your Pi to a decent UPS (and since Pi's don't consume a lot of power a good quality one for like $60-ish will do the job just fine), and if that still doesn't solve the issue then yes you'll definitely have to use a cloud service solution.

And in case if you are worried about using a UPS in general, don't forget that one of the most important ways cloud services can basically guarantee 24/7 operation is by having the cloud services be run on servers hooked up to UPS's.  Even servers at LMG headquarters, none of which are providing any sort of "cloud service" so far afaik, are hooked up to UPS's because even Linus himself knows just how important UPS's can be in ensuring 24/7 computing resources availability.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×