Monu Tools

สร้าง Cron Expression

สร้างและตรวจสอบ cron expressions เลือก preset หรือแก้ไขห้าช่อง และดูเวลาทำงานครั้งถัดไปในเขตเวลาของคุณ ทำงานทั้งหมดในเบราว์เซอร์ของคุณ

วิธีใช้ Cron Generator

  1. 01

    เลือก preset หรือพิมพ์ cron expression ในห้าช่อง

  2. 02

    ดูแต่ละช่องที่มีป้ายกำกับและตรวจสอบความถูกต้องขณะแก้ไข

  3. 03

    อ่านเวลาทำงานครั้งถัดไปที่คำนวณในเขตเวลาท้องถิ่นของคุณ

What a cron expression is

A cron expression is a compact string of five fields that tells a scheduler when to run a task: minute, hour, day of month, month and day of week. It is powerful but easy to get wrong, and a misplaced asterisk can mean a job fires every minute instead of once a day.

How the generator helps

Start from a common preset (every hour, every day at midnight, every Monday at 9 AM) or build a custom expression field by field, with each field labeled and validated as you type.

Crucially, it previews the next five run times in your browser's local time zone, so you can confirm the schedule actually does what you intended before you deploy it.

Field syntax and values

Each field accepts more than a single value: an asterisk means every value, a list like MON,WED,FRI picks several, a range like MON-FRI spans days, and a step like */15 in the minute field runs at 0, 15, 30 and 45 past the hour.

The output works with standard cron on Linux and macOS, crontab, AWS EventBridge, GitHub Actions schedules and most job-scheduling libraries.

Gotchas to watch for

One classic trap is setting both day-of-month and day-of-week: standard cron then runs when either matches, not both, so a job can fire more often than expected. Leaving one of the two as an asterisk avoids the surprise.

This tool targets standard five-field cron, so platform extensions like a seconds field or @reboot are not produced here. Remember too that the job runs in the executing server's time zone, which may differ from the local preview.

คำถามที่พบบ่อย

ห้าช่องหมายความว่าอะไร?

ตามลำดับ: นาที ชั่วโมง วันในเดือน เดือน และวันในสัปดาห์ เครื่องหมายดอกจันหมายถึงทุกค่า ดังนั้น * * * * * จะทำงานทุกนาที

จะทำงานทุก 15 นาทีได้อย่างไร?

ใช้ค่า step ในช่องนาที: */15 * * * * จะทำงานที่นาที 0, 15, 30 และ 45 ของทุกชั่วโมง

ช่องวันในสัปดาห์รับอะไร?

ตัวเลข 0 ถึง 6 (วันอาทิตย์คือ 0 และ 7 ก็หมายถึงวันอาทิตย์) หรือชื่อสามตัวอักษรเช่น MON คุณสามารถใช้ช่วง (MON-FRI) และรายการ (MON,WED,FRI)

ทำไมมันจับคู่วันมากกว่าที่ฉันคาดหวัง?

เมื่อตั้งค่าทั้งวันในเดือนและวันในสัปดาห์ cron มาตรฐานจะทำงานเมื่อเงื่อนไขใดเงื่อนไขหนึ่งตรง ไม่ใช่ทั้งสอง ปล่อย * ไว้หนึ่งข้างเพื่อหลีกเลี่ยงความประหลาดใจ

รองรับวินาทีหรือไวยากรณ์ที่ไม่ใช่มาตรฐานไหม?

ตัวสร้างนี้มุ่งเป้าหมาย cron มาตรฐานห้าช่อง บางแพลตฟอร์มเพิ่มช่องวินาทีหรือส่วนขยายเช่น @reboot ซึ่งไม่ได้สร้างที่นี่

การทำงานอยู่ในเขตเวลาใด?

ตัวอย่างแสดงการทำงานครั้งถัดไปในเขตเวลาท้องถิ่นของเบราว์เซอร์ เซิร์ฟเวอร์ที่รันงานใช้โซนของตัวเอง ดังนั้นตรวจสอบว่าตรงกัน

แหล่งข้อมูล

ฝังเครื่องมือนี้

เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ

<iframe src="https://monu.tools/embed/th/cron-generator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

เครื่องมือที่เกี่ยวข้อง