ª×èÍ, ºØ¤¤Å·ÑèÇä» ¡ÃØ³Ò à¢éÒÊÙèÃкº ËÃ×Í Å§·ÐàºÕ¹
05, ¾ÄȨԡÒ¹ 2024, 04:50:44 am
˹éÒáá ªèÇÂàËÅ×Í ¤é¹ËÒ »¯Ô·Ô¹ à¢éÒÊÙèÃкº ÊÁѤÃÊÁÒªÔ¡
¢èÒÇ: :: µéͧ¡ÒûÃЪÒÊÑÁ¾Ñ¹¸ìÊÔ¹¤éÒµÔ´µèÍ boransat@gmail.com ::

dvb

+  ºÍÃì´âºÃÒ³ ´ÒÇà·ÕÂÁ - HD player - CCTV
|-+  ÍØ»¡Ã³ìà¤Ã×èͧÃѺ´ÒÇà·ÕÂÁ·ÕÇÕ´Ô¨ÔµÍÅ
| |-+  à¤Ã×èͧÃѺÃкº Hi Definition PVR
| | |-+  ᨡʤÃÔ» µÑé§àÇÅÒÃÕºÙµ CCcam º¹ Ubuntu ´éǤÓÊÑè§ Crontab
0 ÊÁÒªÔ¡ áÅÐ 1 ºØ¤¤Å·ÑèÇä» ¡ÓÅѧ´ÙËÑÇ¢é͹Õé « ˹éÒ·ÕèáÅéÇ µèÍä» »
˹éÒ: [1] ŧÅèÒ§ ¾ÔÁ¾ì
¼Ùéà¢Õ¹ ËÑÇ¢éÍ: ᨡʤÃÔ» µÑé§àÇÅÒÃÕºÙµ CCcam º¹ Ubuntu ´éǤÓÊÑè§ Crontab  (ÍèÒ¹ 14343 ¤ÃÑé§)
Basic_Step
Special Member
*
¡ÃзÙé: 631


ÍÕàÁÅì
« àÁ×èÍ: 01, µØÅÒ¤Á 2009, 09:25:51 am »

àËÁÒÐÊÓËÃѺ
 - à¨éҢͧË;ѡ·ÕèäÁèÍÂÒ¡ÃÕºÙµà¤Ã×èͧºèÍ æ
 - à¾×èÍà¤ÅÕÂÃì¤èÒ Temp µèÒ§ æ ÀÒÂã¹à¤Ã×èͧ

ãªé§Ò¹ä´é¡Ñº
 - Ubuntu 6 ¢Öé¹ä»

ÍÍ¡µÑÇÅéÍ¿ÃÕ¡è͹¹Ð¤ÃѺ ·Õè¼Á·Ó¹ÕèÅͧ¡Ñº Ubuntu 6.06 Server i386 ä´é¼Å 100% Êèǹ·èÒ¹·Õèà¡è§¡ÇèÒ ËÃ×ÍÍÂÒ¡àÊÃÔÁàµÔÁáµè§à¾×èÍáÅ¡à»ÅÕ蹤ÇÒÁÃÙé¡Ñ¹¡çàªÔ­ä´éàŤÃѺ ¼Áâ¾ÊẺ¹Õéà¾ÃÒÐÍÂÒ¡áÅ¡à»ÅÕ蹤ÇÒÁÃÙé à¾ÃÒмÁàͧ¡çäÁèà¡è§àËÁ×͹¡Ñ¹ à¾Õ§áµèÃÙéÁÒ¡çàÅÂÍÂÒ¡ºÍ¡µèÍ à»ç¹¡ÒÃáªÃì¡Ñ¹¤ÃѺ


àÃÔèÁ¡Ñ¹àÅÂ
1. à»Ô´â»Ãá¡ÃÁ Putty áÅéÇ Login ãËéàÃÕºÃéÍ ¾ÔÁ¾ì¤ÓÊÑè§ crontab -e ¨Ð¾ºË¹éÒµèÒ§¢Í§â»Ãá¡ÃÁ
2. ¤Ñ´ÅÍ¡¢éͤÇÒÁµèÍ仹Õéŧä»ÇÒ§ à·¤¹Ô¤¡ÒÃÇÒ§¢éÍÁÙÅ·Õè¤Ñ´Åͧã¹â»Ãá¡ÃÁ Putty ¤×ÍËÅѧ¨Ò¡àÃÒÅÒ¡´ÓáÅéÇ Copy ¢éÍÁÙŨҡà¤Ã×èͧàÃÒáÅéÇ ¨Ò¡¹Ñé¹ä»·Õèâ»Ãá¡ÃÁ Putty àÅ×è͹à¤Íà«ÍÃì仵Óá˹觷Õèµéͧ¡Òà áÅФÅÔ¡àÁÒÊì¢ÇÒ 1 ¤ÃÑé§ á¤è¹Õéà»ç¹¡ÒÃÇÒ§¢éÍÁÙÅÊÓËÃѺâ»Ãá¡ÃÁ Putty áÅéǤÃѺ

59 3 * * 1 killall CCcam.x86
0 4 * * 1 /bin/CCcam.x86

¤ÇÒÁËÁÒ¢ͧ¤ÓÊÑè§
ºÃ÷Ѵ·Õè 1 = ·Ø¡Çѹ¨Ñ¹·Ãì àÇÅÒ 3.59 ¹. ãËéËÂØ´â»Ãá¡ÃÁ CCcam.x86
ºÃ÷Ѵ·Õè 2 = ·Ø¡Çѹ¨Ñ¹·Ãì àÇÅÒ 4.00 ¹. ãËéÃѹâ»Ãá¡ÃÁ CCcam.x86

ËÒ¡à¾×è͹ æ ÍÂÒ¡à»ÅÕè¹à»ç¹ÇѹÍ×蹡çá¡ç䢵çàÅ¢ 1 ä´éàÅ â´Â
   1 = Çѹ¨Ñ¹·Ãì
   2 = ÇѹÍѧ¤ÒÃ
   3 = Çѹ¾Ø¸
   4 = Çѹ¾ÄËÑÊ
   5 = ÇѹÈØ¡Ãì
   6 = ÇѹàÊÒÃì
   7 = ÇѹÍÒ·ÔµÂì

3. àÁ×èÍãÊèʤÃÔ»àÊÃç¨áÅéÇ ãËé¡´ Ctrl+X à¾×èÍÍÍ¡¨Ò¡â»Ãá¡ÃÁ Áѹ¶ÒÁÇèÒµéͧ¡ÒÃÍÍ¡¨ÃÔ§ËÃ×ÍäÁè ãËéµÍº Y áÅéÇ¡´ Enter
4. ¾ÔÁ¾ì¤ÓÊÑè§ /etc/init.d/cron restart à¾×èÍÃÕºÙµ¤ÓÊÑè§ Crontab
5. ¾ÔÁ¾ì¤ÓÊÑè§ crontab -l à¾×è͵ÃǨÊͺ¢éÍÁÙÅ·ÕèàÃÒÊÑè§à¢éÒ令ÃѺ

á¹Ð¹Óà¾ÔèÁàµÔÁ
ËÒ¡·èҹ㴵éͧ¡ÒÃÊÑè§ãËéÃÕºÙµà¤Ã×ͧàÅ¡çä´é â´Âá¡é¤ÓÊÑè§ ãËéà»ç¹ /sbin/shutdown -r now à¾Õ§à·èÒ¹Õé¡çÃÕºÙµà¤Ã×èͧä´éáÅéǤÃѺ

Êèǹà¤Ã×èͧ¼ÁÅͧ·ÓàÅè¹ æ ÊèǹµÑÇ ãªéẺ¹ÕéÍÂÙè¤ÃѺ

# Reboot CCcam everyday
59 3 * * 1 killall CCcam.x86
0 4 * * 1 /bin/CCcam.x86
59 3 * * 2 killall CCcam.x86
0 4 * * 2 /bin/CCcam.x86
59 3 * * 3 killall CCcam.x86
0 4 * * 3 /bin/CCcam.x86
59 3 * * 4 killall CCcam.x86
0 4 * * 4 /bin/CCcam.x86
59 3 * * 5 killall CCcam.x86
0 4 * * 5 /bin/CCcam.x86
59 3 * * 7 killall CCcam.x86
0 4 * * 7 /bin/CCcam.x86

# Reboot Server on Saturday
0 4 * * 6 /sbin/shutdown -r now

¤×ÍÃÕºÙµâ»Ãá¡ÃÁ CCcam ·Ø¡ÇѹàÇÅÒ 3.59 - 4.00 ¹. ¡àÇé¹ÇѹàÊÒÃì
ÊèǹÇѹàÊÒÃìãËéÃÕºÙµà¤Ã×èͧàÇÅÒ 04.00 ¹. à¾×èÍÅéÒ§¢éÍÁÙÅ Temp ·Ñé§ËÁ´¨ÃÔ§ æ

ËÁÒÂà赯 ·èҹ㴵éͧ¡ÒÃÃÙéÃٻẺ¤ÓÊÑ觷Ñé§ËÁ´¡ç´Ùä´é¨Ò¡´éÒ¹ÅèÒ§¹Õé¤ÃѺ
format ¢Í§¤ÓÊÑè§ crontab ÁÕ·Ñé§ËÁ´ 6 fields à»ç¹´Ñ§ºÃ÷Ѵ¢éÒ§ÅèÒ§

minute(s) hour(s) day(s) month(s) weekday(s) command(s)

fields 1-5 à»ç¹¡ÒáÓ˹´àÇÅÒ áÅÐ field ·Õè 6 à»ç¹¡ÒáÓ˹´¤ÓÊÑè§ ´Ñ§¤ÇÒÁËÁÒ¢ͧáµèÅÐ fields ´Ñ§µèÍ仹Õé
.....................................................
Field                  ÁÕ¤èÒ         ÃÒÂÅÐàÍÕ´
.....................................................
minute             0-59         àÇÅÒà»ç¹¹Ò·Õ ¨ÐÊÑè§ãËé¤ÓÊÑ觷Õè¡Ó˹´·Ó§Ò¹·Ñ¹·ÕàÁ×èͶ֧
hour                 0-23         àÇÅÒà»ç¹ªÑèÇâÁ§ ¨ÐÊÑè§ãËé¤ÓÊÑ觷Õè¡Ó˹´·Ó§Ò¹·Ñ¹·ÕàÁ×èͶ֧
day                  1-31         àÇÅÒà»ç¹Çѹ ¨ÐÊÑè§ãËé¤ÓÊÑ觷Õè¡Ó˹´·Ó§Ò¹·Ñ¹·ÕàÁ×èͶ֧
month              1-12         àÇÅÒà»ç¹à´×͹ ¨ÐÊÑè§ãËé¤ÓÊÑ觷Õè¡Ó˹´·Ó§Ò¹·Ñ¹·ÕàÁ×èͶ֧
weekday           1-7          ÃÒÂÅÐàÍÕ´͸ԺÒÂáÅéÇ´éÒ¹º¹
command         ¤ÓÊÑ觠         àÃÒÊÒÁÒö¡Ó˹´¤ÓÊÑè§ä´éÁÒ¡ÁÒ ÃÇÁ·Ñé§ script µèÒ§æ µÒÁ·ÕèàÃÒµéͧ¡ÒÃ

¨Ø´ÊӤѭ·Õè¨Ð·ÓãËé¡Ò÷ӧҹµÃ§µÒÁàÇÅÒ¤×Í µéͧµÑé§àÇÅÒãËéµÃ§¡ÑºàÇÅÒ¨ÃÔ§ æ àÃÒÊÒÁÒöãªé¤ÓÊÑè§à·Õº»ÃѺàÇÅÒä´éâ´Â
1. ¡Ó˹´ Time Zone ãËéà»ç¹ Bangkok
ln -sf /usr/share/zoneinfo/Asia/Bangkok  /etc/localtime
2. à·ÕºàÇÅҡѺ Time Server
ntpdate th.pool.ntp.org



ä´é¼Åà»ç¹ÍÂèÒ§äáѹºéÒ§ ¡çÁÒâ¾ÊºÍ¡¡ÅèÒǡѹºéÒ§¹Ð¤ÃѺ
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
zlatan
Newbie
*
¡ÃзÙé: 9


ÍÕàÁÅì
« µÍº #1 àÁ×èÍ: 01, µØÅÒ¤Á 2009, 02:24:20 pm »

¢Íº¤Ø³ÁÒ¡æ àŤÃѺ¼Á
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
matee
ºØ¤¤Å·ÑèÇä»


ÍÕàÁÅì
« µÍº #2 àÁ×èÍ: 01, µØÅÒ¤Á 2009, 06:42:48 pm »

  ¢Íº¤Ø³¤ÃѺ
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
kgs
ºØ¤¤Å·ÑèÇä»


ÍÕàÁÅì
« µÍº #3 àÁ×èÍ: 01, µØÅÒ¤Á 2009, 07:53:04 pm »

¢Íº¤Ø³ÁÒ¡æ¤êÒºººº
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
3K
ºØ¤¤Å·ÑèÇä»


ÍÕàÁÅì
« µÍº #4 àÁ×èÍ: 01, µØÅÒ¤Á 2009, 08:29:53 pm »

ÊØâ¤è¤ÃѺ
Smiley
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
pusit
Special Member
*
¡ÃзÙé: 271


ÍÕàÁÅì
« µÍº #5 àÁ×èÍ: 02, µØÅÒ¤Á 2009, 09:00:54 am »

àÇÅÒÁѹäÁèµÃ§ ¢ÍÇÔ¸ÕµÑé§àÇÅÒã¹ Ubuntu ´éÇÂÊÔ¤ÃѺ
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
Basic_Step
Special Member
*
¡ÃзÙé: 631


ÍÕàÁÅì
« µÍº #6 àÁ×èÍ: 02, µØÅÒ¤Á 2009, 09:02:03 am »

àÇÅÒÁѹäÁèµÃ§ ¢ÍÇÔ¸ÕµÑé§àÇÅÒã¹ Ubuntu ´éÇÂÊÔ¤ÃѺ


µÒÁ¹ÕéàÅÂ

¨Ø´ÊӤѭ·Õè¨Ð·ÓãËé¡Ò÷ӧҹµÃ§µÒÁàÇÅÒ¤×Í µéͧµÑé§àÇÅÒãËéµÃ§¡ÑºàÇÅÒ¨ÃÔ§ æ àÃÒÊÒÁÒöãªé¤ÓÊÑè§à·Õº»ÃѺàÇÅÒä´éâ´Â
1. ¡Ó˹´ Time Zone ãËéà»ç¹ Bangkok
ln -sf /usr/share/zoneinfo/Asia/Bangkok  /etc/localtime
2. à·ÕºàÇÅҡѺ Time Server
ntpdate th.pool.ntp.org
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
leng
Newbie
*
¡ÃзÙé: 20


ÍÕàÁÅì
« µÍº #7 àÁ×èÍ: 17, ¾ÄȨԡÒ¹ 2009, 05:11:28 pm »

ÊØ´·éÒ ¨ÍÁÂØ·¸¼Ùé¡ÅéÒ¡çÍÂÙè·Õèà¢ÒàËÅÕ§«Ò¹ ÍØé ºÍÃì´âºÃÒ¹¹Õèàͧ  ¢Íº¤Ø³¤ÃѺ
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
leng
Newbie
*
¡ÃзÙé: 20


ÍÕàÁÅì
« µÍº #8 àÁ×èÍ: 30, ¸Ñ¹ÇÒ¤Á 2009, 02:43:08 pm »

·Õèµéͧá¡é䢤ÃѺ Çѹ¨ÐàÃÔèÁ¨Ò¡ 0 - 6 ¹Ð äÁèªè 1- 7
day of the week (0-6 with 0=Sunday)  0 = ÇѹÍÒ·ÔµÂì 1 = Çѹ¨Ñ¹·Ãì  >>  6 = ÇѹàÊÒÃì
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
ÔºÍÂ
ºØ¤¤Å·ÑèÇä»


ÍÕàÁÅì
« µÍº #9 àÁ×èÍ: 22, ¡Ã¡®Ò¤Á 2010, 01:27:22 pm »

¢Í¤ÓÂ×¹ÂѹÍÕ¡·Õ¤ÃѺ Çѹ¨ÐàÃÔèÁ¨Ò¡ 0 - 6 ËÃ×Í 1- 7
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
thefluke
Jr. Member
**
¡ÃзÙé: 134


ÍÕàÁÅì
« µÍº #10 àÁ×èÍ: 06, ¡Ñ¹ÂÒ¹ 2010, 06:14:56 pm »

¢Í¤ÓÂ×¹ÂѹÍÕ¡·Õ¤ÃѺ Çѹ¨ÐàÃÔèÁ¨Ò¡ 0 - 6 ËÃ×Í 1- 7

0,7 = sunday

ÍéÒ§ÍÔ§ "When specifying day of week, both day 0 and day 7  will  be  considered Sunday."
http://manpages.ubuntu.com/manpages/hardy/man5/bcrontab.5.html
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
Basic_Step
Special Member
*
¡ÃзÙé: 631


ÍÕàÁÅì
« µÍº #11 àÁ×èÍ: 06, ¡Ñ¹ÂÒ¹ 2010, 06:38:20 pm »

â¾ÊãËéÍèÒ¹¡Ñ¹äÇéµÑ駹ҹ àËç¹à¶Õ§¡Ñ¹ä»ÁÒ àÃ×èͧ¡ÒõÑé§Çѹ ʧÊѼÁ¨Ð¾ÔÁ¾ì¼Ô´ àÍÒµÒÁ¹ÕéáÅéǡѹ¤ÃѺ ¨Ðä´éà¤ÅÕÂÃì㨡ѹ·Ø¡·èÒ¹

Crontab Sections

Each of the sections is separated by a space, with the final section having one or more spaces in it. No spaces are allowed within Sections 1-5, only between them. Sections 1-5 are used to indicate when and how often you want the task to be executed. This is how a cron job is laid out:

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

ÍéÒ§ÍÔ§¨Ò¡ https://help.ubuntu.com/community/CronHowto
á¨é§Åº¡ÃзÙé¹ÕéËÃ×͵ԴµèͼÙé´ÙáÅ   ºÑ¹·Ö¡¡ÒÃà¢éÒ
˹éÒ: [1] ¢Ö鹺¹ ¾ÔÁ¾ì 
« ˹éÒ·ÕèáÅéÇ µèÍä» »
¡ÃÐâ´´ä»:  
 
µÔ´ Banner ´éÒ¹ÅèÒ§µÔ´µèÍ boransat@gmail.com
¡ÃзÙé ¤ÇÒÁ¤Ô´àËç¹ º·¤ÇÒÁ ¢éͤÇÒÁã´ æ·Õèä´éÍèҹ㹺Íô¹Õé à¡Ô´¨Ò¡¡ÒÃà¢Õ¹â´ÂÊÒ¸Òóª¹ áÅеվÔÁ¾ìẺÍѵâ¹ÁÑµÔ ¼Ùé´ÙáÅ äÁè¨Óà»ç¹µéͧàËç¹´éÇÂáÅÐ äÁèÃѺ¼Ô´ªÍºµèÍ¢éͤÇÒÁã´æ ¼ÙéÍèÒ¹¨Ö§¤ÇÃãªéÇÔ¨Òó­Ò³ã¹¡ÒáÅÑ蹡Ãͧ´éǵÑÇàͧ áÅжéÒ¾ºàËç¹¢éͤÇÒÁã´æ ·Õè¢Ñ´µèÍ¡®ËÁÒ ÈÔŸÃÃÁ ¡ÃسÒá¨é§ÁÒ·Õè boransat@gmail.com à¾×èÍ·Õè·ÕÁ§Ò¹¨Ðä´é´Óà¹Ô¹¡ÒõèÍä»



à¢éÒÊÙèÃкº´éǪ×èͼÙéãªé ÃËÑʼèÒ¹ áÅÐÃÐÂÐàÇÅÒã¹à«ÊªÑè¹

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC | Thai language by ThaiSMF Valid XHTML 1.0! Valid CSS!
˹éÒ¹Õé¶Ù¡ÊÃéÒ§¢Öé¹ÀÒÂã¹àÇÅÒ 0.025 ÇÔ¹Ò·Õ ¡Ñº 20 ¤ÓÊÑè§