ถ้าใช้เครื่อง centos แล้วใช้คำสั่ง crontab -e
เปิดมาเป็นไฟลเปล่าๆก็เขียนคำสั่งลงไปเลยหรือป่าวครับ
ถ้าใช้เครื่อง centos แล้วใช้คำสั่ง crontab -e
เปิดมาเป็นไฟลเปล่าๆก็เขียนคำสั่งลงไปเลยหรือป่าวครับ
ถั่วต้ม. ใส่ cron แล้วก็
service crond restart
ใส่เป็น * * * * * บลาๆๆ ไปเลยหรอครับ
แล้วถ้าจะเพิ่มอีกคำสั่งก็ขึ้นบรรทัดใหม่ใช่ไหมครับ
ถ้าใส่ * หมด มันก็รันทุกนาทีเลยมั๊งฮะนั่น
Crontab syntax
A crontab file has six fields for specifying minute, hour, day of month, month, day of week and the command to be run at that interval. See below:
| | | | |
| | | | ±---- day of week (0 - 6) (Sunday=0)
| | | ±------ month (1 - 12)
| | ±-------- day of month (1 - 31)
| ±---------- hour (0 - 23)
±------------ min (0 - 59)