คือผมทำวิทยุออนไลน์ครับ ปัญหาคือ วิทยุมันดาวน์ทุกเที่ยงคืนอ่าครับ ต้องเทียวไปเปิด วิทยุให้มัน online ใน CAST
ก็ crontab/cronjob ให้มันรันหลังเที่ยงคืนไปกันเหนียว
คงเป็นเพราะระบบอัพเดท ล็อกบลาๆๆ หรือเปล่า ถึงทำให้ service ตาย
ไอ้ crontab/cronjob
[SSH]
Syntax
crontab [-e] [-l] [-r] [filename]
-e edit a copy of the current user’s crontab file, or creates an empty file to edit if crontab does not exist. When editing is complete, the file is installed as the user’s crontab file. If a user- name is given, the specified user’s crontab file is edited, rather than the current user’s crontab file; this may only be done by a super-user. The environment variable EDITOR determines which editor is invoked with the -e option. The default editor is ed. Note that all crontab jobs should be submitted using crontab ; you should not add jobs by just editing the crontab file because cron will not be aware of changes made this way.
-l list the crontab file for the invoking user. Only a super-user can specify a username following the -r or -l options to remove or list the crontab file of the specified user.
-r remove a user’s crontab from the crontab
filename The filename that contains the commands to run.
Lines that can be in the crontab file.
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday).
Examples
crontab -e = edits the crontab file to be used.
0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.
Below is a table that represents what each of the above fields are for. min hour dayofmonth monthofyear dayofweek command
0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.
ไอ้คำสั่ง สคริปเปิด port วิทยุ ทั้งหมด ว่ายังไงบ้างครับ ไม่รู้สริปมันนี่แหละครับ ขอบคุณครับผม ผมปึก
command คร่าวๆ ก็มี
./sc_serv /etc/shoutcast/8080.conf
ไม่แน่ใจว่าถ้าจะรันหลายๆ port คงสร้างไฟล์ขึ้นมาแล้วเอา command ข้างบนใส่เป็นบรรทัดๆ ไป
./sc_serv /etc/shoutcast/8080.conf &
./sc_serv /etc/shoutcast/8081.conf &
./sc_serv /etc/shoutcast/8082.conf &
แล้วก็ใช้ cron รันไฟล์ที่สร้างมาเอา
ปล. ผิดพลาดประการใดขออภัย