DEV Community

Cover image for How I Run 24/7 Automations for FREE Using GitHub Actions (No Servers Needed)
Igor Ganapolsky
Igor Ganapolsky

Posted on

How I Run 24/7 Automations for FREE Using GitHub Actions (No Servers Needed)

I got tired of paying for servers just to run simple scheduled scripts. Cron jobs on a VPS? $5-20/month. AWS Lambda? Complexity overhead and surprise bills.

Then I realized: GitHub Actions gives you 2,000 free minutes/month on the free tier. That's enough to run a script every 2 hours, 24/7, for $0.

The Setup (5 Minutes)

Create .github/workflows/automation.yml:

name: 24/7 Automation
on:
  schedule:
    - cron: '0 */2 * * *'  # Every 2 hours
  workflow_dispatch:        # Manual trigger

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - run: pip install requests
      - run: python your_script.py
        env:
          API_KEY: ${{ secrets.API_KEY }}
Enter fullscreen mode Exit fullscreen mode

What I Automate

  • Price monitoring - Track competitor prices, get alerts
  • Content aggregation - Pull data from APIs, compile reports
  • Health checks - Ping my services, alert on failures
  • Data backups - Export from one service, push to another

The Limits (And How to Work Around Them)

Limit Free Tier Workaround
Minutes/month 2,000 Keep scripts under 5 min each
Concurrent jobs 20 Queue with workflow_dispatch
Cron minimum 5 min Acceptable for most monitoring
Repo must be active 60 days Add a keep-alive workflow

Notifications with ntfy.sh

I use ntfy.sh for free push notifications:

import requests

def alert(message):
    requests.post(
        "https://ntfy.sh/your-topic",
        data=message,
        headers={"Priority": "high"}
    )
Enter fullscreen mode Exit fullscreen mode

Now I get mobile alerts whenever my automations detect something important.

Full Template Pack

I packaged my production-tested workflows into a template pack:

The free version is enough to get started. Grab it, modify it, ship it.


Questions? Drop them in the comments. I've been running this setup for months and happy to help troubleshoot.

Top comments (0)