cron job ဆိုတာ windows မှာ schedule နဲ့ အတူတူပါပဲ။ cron job က မတူတဲ့အပိုင်းကတော့ cron file ရေးရတာပဲ။ သူ့ format က ဒီလိုရေးပါတယ်။

minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday), command

ဥပမာ

01 04 1 1 1 /usr/bin/somedirectory/somecommand

အမြဲတန်းဆိုရင်တော့ * ကို အသုံးပြုနိုင်ပါတယ်။

01 04 * * * /usr/bin/somedirectory/somecommand

အဲဒါက every day,every month, every week လို့ပြောလိုက်တာပါ။

cron job ကို အသုံးပြုဖို့ crontab ဆိုတဲ့ command line နဲ့ အသုံးပြုတယ်။

$crontab filename Add by file name
$crontab -e Edit in comand line Editor
$crontab -l Cron List
$crontab -r Remove

command ကို sh file အနေနဲ့ အသုံးပြုလို့ရပါတယ်။

cron job ကို အထူးသဖြင့် backup လုပ်တဲ့နေရာတွေမှာ အသုံးပြုတတ်ကြပါတယ်။ Unix like system တွေအတွက် အလွန်ကို အသုံးဝင်ပါတယ်။

One response to “Cron job”

  1. ဘာအလုပ်များလဲလို့လာကြည့်တယ်။

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Saturngod

Subscribe now to keep reading and get access to the full archive.

Continue reading