Cron Job Every 2 minutes
Trigger a task every two minutes for near real-time automation. Use the cron string */2 * * * *, see the next 5 execution times, and copy Python, Node.js, Bash and n8n snippets.
Quick Answers
- What does the "Every 2 minutes" cron expression mean?
- This cron expression is "*/2 * * * *", which in plain English means: Trigger a task every two minutes for near real-time automation..
- When will this cron expression run next?
- With the expression "*/2 * * * *", the next execution times are Thu, Aug 06, 2026, 12:14:00 PM UTC, Thu, Aug 06, 2026, 12:16:00 PM UTC, Thu, Aug 06, 2026, 12:18:00 PM UTC.
- How do I use this cron expression?
- Copy the exact string into crontab, cron triggers, or any scheduler such as GitHub Actions, n8n or Docker. Pre-built code snippets for Python, Node.js, Bash, Docker, GitHub Actions and n8n are included on this page.
Cron Expression
Copy this exact string into crontab, cron triggers, or schedulers.
*/2 * * * *Human readable
Trigger a task every two minutes for near real-time automation.
Next 5 execution times
- 1Thu, Aug 06, 2026, 12:14:00 PM UTC
- 2Thu, Aug 06, 2026, 12:16:00 PM UTC
- 3Thu, Aug 06, 2026, 12:18:00 PM UTC
- 4Thu, Aug 06, 2026, 12:20:00 PM UTC
- 5Thu, Aug 06, 2026, 12:22:00 PM UTC
Python
from crontab import CronTab
from datetime import datetime
# Install: pip install python-crontab
cron = CronTab(user=True)
job = cron.new(command="/usr/bin/python3 /var/www/job_every-2-minutes.py", comment="scheduled by crongen")
job.setall("*/2 * * * *")
cron.write()
print(f"Installed: */2 * * * * -> /usr/bin/python3 /var/www/job_every-2-minutes.py")