---
title: "Cron Jobs with Django and GitHub Actions"
description: "Scheduled Django management commands can run against a Railway project by using a GitHub Actions workflow on a cron schedule."
url: "https://swe.quest/articles/cron-jobs-with-django-and-github-actions-51c1dc05687de3cc"
canonical: "https://blog.railway.com/p/cron-jobs-django-github-actions"
source: "Railway"
published: "2023-03-22"
difficulty: "medium"
kind: "How-to"
reading_minutes: 2
tags: ["ci-cd","python","scheduling"]
---

# Cron Jobs with Django and GitHub Actions

A post on [Railway](https://swe.quest/sources/railway.md), published 2023-03-22, 2 min read, How-to. Original: [https://blog.railway.com/p/cron-jobs-django-github-actions](https://blog.railway.com/p/cron-jobs-django-github-actions)

## Summary

Scheduled Django management commands can run against a Railway project by using a GitHub Actions workflow on a cron schedule. The workflow checks out the repo, installs the Railway CLI via npm, and uses \`railway run --service\` with a project-scoped RAILWAY\_TOKEN secret to install requirements and execute \`python manage.py my\_command\` in the service's environment. An August 2023 update notes that Railway now supports cron jobs natively, which may be the better option.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Scheduling](https://swe.quest/tags/scheduling.md) (Distributed systems)

## Prerequisites

- Django management commands ([easy posts on Engineering management](https://swe.quest/tags/engineering-management.md?difficulty=easy))
- GitHub Actions basics ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- cron expressions

## Keywords

Django, GitHub Actions, Railway CLI, Railway

## Related posts

- [Cron Jobs on Railway](https://swe.quest/articles/cron-jobs-on-railway-97c5484f2a611343.md): Railway · 2022-08-18 · Medium · 3 min read · Deployment, TypeScript, Scheduling, Cloud platforms
  Before native cron support existed, Railway cron jobs could be run as an ordinary long-lived service that schedules work with a language-level library.
- [Using Github Actions with Railway](https://swe.quest/articles/using-github-actions-with-railway-5eb8da35bcdd7f7c.md): Railway · 2021-06-04 · Medium · 2 min read · CI/CD, Deployment
  Railway deployments can be driven from GitHub Actions instead of the built-in branch-push trigger by creating a project token, storing it as a repository secret (RAILWAY\_TOKEN), and running \`railway up --service=\<id\>\` inside the official Railway CLI container.
- [Using GitLab CI/CD with Railway](https://swe.quest/articles/using-gitlab-ci-cd-with-railway-8ac9ff086ab7cb53.md): Railway · 2022-08-20 · Medium · 2 min read · CI/CD, Deployment
  Deploying to Railway from GitLab CI/CD comes down to a project token plus a small job that runs the Railway CLI.
- [Less Dashboards. More Robots. Railway, for Agents](https://swe.quest/articles/less-dashboards-more-robots-railway-for-agents-d92651b984548ff3.md): Railway · 2026-06-03 · Easy · 11 min read · AI agents, Developer tools, Deployment, Cloud platforms
  Railway is repositioning its platform around coding agents, bundling the CLI, MCP configuration and agent skills behind a single installer (\`install.sh --agents -y\`) so harnesses like Claude or Codex can deploy, configure and debug services without the dashboard.
- [Working with NX, Railway and CI/CD](https://swe.quest/articles/working-with-nx-railway-and-ci-cd-0bc2b769ee29696c.md): Railway · 2022-09-16 · Medium · 3 min read · CI/CD, Deployment, Build systems, JavaScript
  A GitHub Actions workflow can deploy only the NX monorepo apps affected by a push to Railway, replacing Railway's built-in GitHub trigger.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
