Cloud VPS

Run Bots and Automation Scripts 24/7 on a VPS

Updated 2026-07-07~8 min read

Discord bots and trading bots are not the only jobs that need to stay on all the time. There are many more scripts and automated tasks you want running continuously on their own, such as a Telegram bot sending alerts, a web scraper that pulls data on schedule, an automatic backup script, or automation that ties several services together.

These jobs share one thing in common: they "must run continuously without anyone starting them," which a home PC does poorly. This article explains why a VPS suits every kind of automation job, how to use pm2 for scripts that must run all the time and cron for jobs that must run on schedule, plus the VPS spec that is enough.

Which automation jobs are a good fit for a VPS

First, let's look at which jobs you should move from a home PC to a VPS. The simple rule is: if the job has to work even when you are not at the machine, or has to run at a set time every day, that is a job that belongs on a VPS.

Take a look at the popular jobs people run on a VPS below. Many are small scripts that use few resources but demand high continuity, which is exactly where a VPS fits.

  • Telegram bot — alert bots, Q&A bots, bots that connect to various APIs
  • Web scraper / crawler — pull prices, products, or news on a schedule
  • Automation scripts — connect several services, e.g. check email then send to Line/Slack
  • Scheduled jobs (cron) — automatic backups, daily reports, data sync
  • Uptime / monitoring — keep checking whether a website or API is still up, then alert
  • Webhook listener — wait for events from other services, then process them
💡 If your job "has to work while you are away" or "has to run on time every day," that is a sign it belongs on a VPS.

Why a home PC is a poor fit for automation jobs

A home PC can run scripts, sure, but the moment it has to run 24/7 you hit the same problems as other bots: having to leave the machine on, dropped connections, power cuts, or accidentally shutting down and stopping the job. A job that should run at midnight simply does not, because the PC is off.

  • You have to leave the PC on 24/7, wasting power and making it awkward to use for anything else
  • Shutdown/sleep = automation stops and scheduled jobs do not run
  • A dropped home connection or power cut kills the script without you noticing
  • Cron on a PC that switches on and off is unreliable and jobs miss their round
  • A home IP is unstable, unsuitable for webhooks or services that must be reachable from outside
💡 Automation needs "certainty" of timing and continuous uptime, which a home PC cannot provide.

How a VPS helps with running automation scripts

A VPS stays on inside a datacenter 24 hours a day, with backup power and networking and 99.9% uptime, so your scripts and bots run continuously even when you switch off your home PC. You get Full Root Access to install Python, Node.js, headless Chrome, or any tool you need, and you can choose your OS, both Linux and Windows.

Crucially, a VPS gives you accurate timekeeping and stays on all the time, so cron jobs run on time every day without fail, and a stable IP makes it easy to set up webhooks or let other services reach you. All of it is managed over SSH from anywhere.

  • On 24/7 with 99.9% uptime, so scripts run continuously and cron jobs are on time
  • Full Root Access to install Python/Node/scraping tools freely
  • A stable IP, ideal for webhooks and services that must be reachable from outside
  • Choose your OS, both Linux (the most popular) and Windows
  • Manage over SSH from anywhere, view logs, and restart jobs
💡 Plusweb Cloud VPS provisions automatically within minutes, so you can start putting scripts to run continuously right away.

pm2 vs cron: which to use for which job

On a Linux VPS there are two main tools for running jobs automatically. The difference comes down to the nature of the job: a job that must run "all the time" uses pm2, while a job that must run "at intervals" uses cron. Pick the right one and the work is easy and stable.

Pointpm2 (runs continuously)cron (runs on schedule)
Suits jobsTelegram bots, webhooks, monitoring that must stay onlineBackups, daily scrapers, scheduled reports
How it worksA process stays open all the timeRuns a script then finishes, on a set round
Restart on crashYes, restarts automaticallyNo, runs the next round on schedule
Starts after VPS rebootYes (pm2 startup + save)Yes (cron runs when the system comes up)
Example commandpm2 start bot.pycrontab -e to set the time
💡 You can use both together, e.g. run a Telegram bot with pm2 all the time and set a cron for a daily backup job on the same machine.

Steps to keep a Python/Node script running with pm2

For jobs that must stay online all the time

If the job has to stay open all the time, like a Telegram bot or a listener, use pm2, which runs the script in the background and restarts it automatically if it crashes or the VPS reboots. Here is a rough outline of the steps.

  1. 1SSH into the VPS with ssh root@your-ip
  2. 2Install the runtime you need, e.g. Node.js + npm or python3 + pip
  3. 3Upload/clone the code onto the machine, then install dependencies (npm install or pip install -r requirements.txt)
  4. 4Install pm2 with npm install -g pm2
  5. 5Start it: Node uses pm2 start app.js --name mytask / Python uses pm2 start app.py --interpreter python3 --name mytask
  6. 6Run pm2 startup then pm2 save so it starts itself automatically every time the VPS reboots
  7. 7Check the status with pm2 status and view logs with pm2 logs
💡 Use pm2 restart mytask when you update the code, and pm2 logs mytask when you want to see whether the script is working or where an error is.

Steps to schedule jobs with cron

For jobs that run in rounds, e.g. daily/hourly

If the job runs and finishes on a round, like a backup every midnight or a scraper every hour, use cron, which already ships with Linux, no extra install needed.

  1. 1Open the cron table with crontab -e
  2. 2Add a line in the time format, e.g. 0 0 * * * /usr/bin/python3 /root/backup.py runs every midnight
  3. 3Use a website to help calculate cron times if you are not yet used to the number format
  4. 4Redirect output to a log file, e.g. >> /root/backup.log 2>&1 so you can check it later
  5. 5Save and exit, and cron runs at the set time automatically
💡 Do not forget to use the full path of the interpreter and the script file in cron, because cron does not use the same environment as a normal login.

How much VPS spec do automation jobs need

Most automation scripts use few resources, and starting with the smallest spec is usually enough, except for scraping jobs that open several headless browser pages at once, or heavy data processing, where you should leave extra RAM.

Recommended specSuits which kind of jobNotes
1 vCPU / 1 GB RAMTelegram bot, small scripts, daily cronEnough for general automation
1 vCPU / 2 GB RAMSeveral scripts at once, a light scraperExtra RAM to run multiple jobs
2 vCPU / 2–4 GB RAMA scraper using a headless browser, processing workHandles heavier jobs
2+ vCPU / 4+ GB RAMMultiple automation systems, large data processingFor high-load jobs
💡 A scraping job that opens headless Chrome uses much more RAM than a plain script, so if you scrape several pages at once, leave extra RAM.

Summary: put automation jobs on a VPS to run themselves continuously

Whether it is a Telegram bot, a web scraper, a scheduled backup job, or automation tying several services together, they all share one thing: they must run themselves continuously without anyone starting them. A VPS that is on 24/7 with 99.9% uptime, gives you Full Root Access, and lets you choose your OS is the right home for these jobs.

Pick the right tool for the job — pm2 for jobs that must stay online all the time, and cron for scheduled jobs — then start with a small VPS spec that is enough for most scripts. With that, your automation runs itself all the time, even after you have switched off your PC.

Let bots and automation scripts run themselves 24/7 on Plusweb Cloud VPS

From ฿150/month · Full Root Access · KVM · SSD · 99.9% uptime · Choose Linux or Windows · Auto-provisioned — put a Telegram bot, scraper, or cron to work on its own without leaving your home PC on

Frequently Asked Questions

How do I run a Python script 24/7 on a VPS?

For a script that must stay on all the time, use pm2: run pm2 start app.py --interpreter python3, then pm2 startup + pm2 save so it starts itself when the VPS reboots. For a scheduled job, like daily, use cron via crontab -e to set the time instead.

Should I use pm2 or cron for automation jobs?

Use pm2 for jobs that must stay online all the time, like a Telegram bot, webhook, or monitoring. Use cron for jobs that run in a round and finish, like a daily backup or an hourly scraper. You can use both together on the same machine.

What spec do I need to run a Telegram bot on a VPS?

A typical Telegram bot uses very few resources. Starting at 1 vCPU / 1 GB RAM is enough. If you run several bots or a heavy-processing bot, step up to 1–2 vCPU / 2 GB RAM or more.

Can I run a web scraper on a VPS, and what should I watch out for?

Yes, but a scraper that opens a headless browser like Chrome uses more RAM than a plain script. If you pull several pages at once, leave 2–4 GB RAM, and respect the terms of use of the site you scrape, setting a reasonable frequency rather than hammering it.

Why not just set cron on my home PC instead of renting a VPS?

Because cron only works while the machine is on. If the home PC is asleep or off when the time comes, the job does not run, and a power cut or dropped connection also causes a missed round. A VPS is on 24/7 with accurate time and a stable IP, so automation runs every round without fail.