How can I execute a cron job twice daily at midnight and 13:30?
Use two lines: 0 0 * * * for midnight and 30 13 * * * for 13:30. A combined 0,30 0,13 * * * fires four times a day: cron pairs every minute with every hour.
How can I execute a cron job twice daily at midnight and 13:30?
Use two cron expressions because the two times have different minute and hour values. The first runs at 00:00, and the second runs at 13:30, every day.
# every day at midnight
0 0 * * *# every day at 13:30
30 13 * * *Read 0 0 * * * from left to right: minute 0 and hour 0 select midnight, while the three * fields allow every day of the month, every month, and every day of the week. Read 30 13 * * * the same way: minute 30 and hour 13 select 13:30, with every date, month, and day of the week allowed. You cannot pair minute 0 only with hour 0 and minute 30 only with hour 13 in one standard five-field expression. Writing 0,30 0,13 * * * selects both minutes for both hours, so it fires at 00:00, 00:30, 13:00, and 13:30. Keep the command identical on both crontab lines if both times should perform the same work.
0 0 * * * on CrontapCron evaluates selected field values as combinations, not as ordered pairs. Trying to compress two differently aligned times into one expression causes a double-fire pattern: two intended runs become four. Extra executions can duplicate notifications, reports, billing actions, or data imports. Separate lines preserve the minute-hour pairing and make each trigger auditable. If duplicate work would be harmful, the command should also be idempotent or protected by a lock. This is the same constraint as the 8:00 AM and 3:30 PM case.
Read the dedicated guide: Cron twice a day.
0 0 * * * — command
30 13 * * * — command
See this cron expression on the calendar view example
Write the cron here. Run it on Crontap.
WordPress, Shopify, Railway, Cloud Run, Vercel, HubSpot, Ghost, your own box. If it answers HTTP, Crontap can drive it on a clock you can read, in the timezone that actually matters, and page you when something breaks.
1.9k+ teams · Free forever tier · No credit card
Permalink: https://tool.crontap.com/help/cron-job-run-script-at-two-different-specific-times