<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Quang Ngo Blog]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://blog.quangnv.com/</link><image><url>https://blog.quangnv.com/favicon.png</url><title>Quang Ngo Blog</title><link>https://blog.quangnv.com/</link></image><generator>Ghost 5.49</generator><lastBuildDate>Tue, 07 Apr 2026 11:05:33 GMT</lastBuildDate><atom:link href="https://blog.quangnv.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[php setting for Japanese use (Content-Type: charset=UTF-8)]]></title><description><![CDATA[<figure class="kg-card kg-image-card"><img src="https://blog.quangnv.com/content/images/2016/03/charset-1.png" class="kg-image" alt loading="lazy"></figure><p>Last week, I faced a problem with my Japanese RHEL/PHP/Apache server. <br>My php pages responsed with <code>charset=Shift-JIS</code> in <code>Content-Type</code> header but all my codes are encoded with <code>UTF-8</code>.</p><p>I tried adding <code>AddDefaultCharset UTF-8</code>, <code>php_value default_charset UTF-8</code> to apache config file, add <code>&lt;meta http-equiv=&quot;</code></p>]]></description><link>https://blog.quangnv.com/php-setting-for-japanese-use/</link><guid isPermaLink="false">6317110d5e194a82154e422c</guid><dc:creator><![CDATA[Quang Ngo]]></dc:creator><pubDate>Mon, 07 Mar 2016 01:00:00 GMT</pubDate><media:content url="https://blog.quangnv.com/content/images/2018/12/japan-flag.jpg" medium="image"/><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="https://blog.quangnv.com/content/images/2016/03/charset-1.png" class="kg-image" alt="php setting for Japanese use (Content-Type: charset=UTF-8)" loading="lazy"></figure><img src="https://blog.quangnv.com/content/images/2018/12/japan-flag.jpg" alt="php setting for Japanese use (Content-Type: charset=UTF-8)"><p>Last week, I faced a problem with my Japanese RHEL/PHP/Apache server. <br>My php pages responsed with <code>charset=Shift-JIS</code> in <code>Content-Type</code> header but all my codes are encoded with <code>UTF-8</code>.</p><p>I tried adding <code>AddDefaultCharset UTF-8</code>, <code>php_value default_charset UTF-8</code> to apache config file, add <code>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</code> and even add <code>header(&apos;Content-Type: text/html; charset=UTF-8&apos;);</code> to php pages but nothing worked.</p><p>Finally, figured out that the problem was related to mbstring settings in <code>php.ini</code>. <br>It was like this: &#xA0;</p><pre><code>[mbstring]
mbstring.language = Japanese  
mbstring.internal_encoding = EUC-JP  
mbstring.http_input = auto  
mbstring.http_output = SJIS  
mbstring.encoding_translation = On  
mbstring.detect_order = auto  
;mbstring.substitute_character = none
mbstring.func_overload = 0  
mbstring.strict_detection = Off  
;mbstring.http_output_conv_mimetype=
</code></pre><p>Change to this: &#xA0;</p><pre><code>[mbstring]
mbstring.language = Japanese  
mbstring.internal_encoding = UTF-8  
mbstring.http_input = pass  
mbstring.http_output = pass  
mbstring.encoding_translation = Off  
mbstring.detect_order = UTF-8,SJIS,EUC-JP,JIS,ASCII  
mbstring.substitute_character = none  
mbstring.func_overload = 0  
mbstring.strict_detection = Off  
;mbstring.http_output_conv_mimetype=
</code></pre><p>And now my php pages response with <code>charset=UTF-8</code> in <code>Content-Type</code> header. Happy again :)</p><p>Reference: <br><a href="http://www.phpbook.jp/install/phpini/index5.html?ref=blog.quangnv.com">http://www.phpbook.jp/install/phpini/index5.html</a> (Japanese)</p>]]></content:encoded></item><item><title><![CDATA[[Nginx] How to redirect http to https and www to non-www (and vice versa)]]></title><description><![CDATA[Today let's see some common redirections with Nginx]]></description><link>https://blog.quangnv.com/nginx-how-to-redirect-http-to-https-and-www-to-non-www-and-vice-versa/</link><guid isPermaLink="false">6317110d5e194a82154e422b</guid><category><![CDATA[nginx]]></category><category><![CDATA[server]]></category><dc:creator><![CDATA[Quang Ngo]]></dc:creator><pubDate>Sat, 23 Jan 2016 01:00:00 GMT</pubDate><media:content url="https://blog.quangnv.com/content/images/2018/12/redirection-301-302.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.quangnv.com/content/images/2018/12/redirection-301-302.jpg" alt="[Nginx] How to redirect http to https and www to non-www (and vice versa)"><p>Hi, today let&apos;s see some common redirections with Nginx. </p><figure class="kg-card kg-image-card"><img src="https://blog.quangnv.com/content/images/2016/02/redirection-301-302.jpg" class="kg-image" alt="[Nginx] How to redirect http to https and www to non-www (and vice versa)" loading="lazy"></figure><p><em>(Photo credit: bloggingkeys.com)</em></p><h3 id="http-to-https">http to https</h3><pre><code>server {
    listen         80;
    server_name    example.com;
    return         301 https://$server_name$request_uri;
}
</code></pre><h3 id="www-to-non-www">www to non-www</h3><pre><code>server {
    server_name www.example.com;
    return 301 $scheme://example.com$request_uri;
}
</code></pre><p>And <strong>include https</strong> &#xA0;</p><pre><code>server {
    listen 80;
    listen 443 ssl;
    server_name            www.example.com;
    ssl_certificate        /path/to/certificate;
    ssl_certificate_key    /path/to/certificate/key;
    return 301 $scheme://example.com$request_uri;
}
</code></pre><h3 id="non-www-to-www">non-www to www</h3><pre><code>server {
    server_name example.com;
    return 301 $scheme://www.example.com$request_uri;
}
</code></pre><p>And <strong>include https</strong> &#xA0;</p><pre><code>server {
    listen 80;
    listen 443 ssl;
    server_name            example.com;
    ssl_certificate        /path/to/certificate;
    ssl_certificate_key    /path/to/certificate/key;
    return 301 $scheme://www.example.com$request_uri;
}
</code></pre>]]></content:encoded></item><item><title><![CDATA[Dùng crontab để tự động chạy task trên Linux]]></title><description><![CDATA[Bạn có thể xử lý các công việc mệt mỏi, nhàm chán, khó khăn một cách tự động với crontab!
Bây giờ chúng ta sẽ cùng tìm hiểu cron và crontab là gì.]]></description><link>https://blog.quangnv.com/dung-crontab-de-tu-dong-chay-task-tren-linux/</link><guid isPermaLink="false">6317110d5e194a82154e422d</guid><dc:creator><![CDATA[Quang Ngo]]></dc:creator><pubDate>Tue, 05 Jan 2016 14:04:00 GMT</pubDate><media:content url="https://blog.quangnv.com/content/images/2016/04/watch.jpg" medium="image"/><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="https://blog.quangnv.com/content/images/2016/04/watch.jpg" class="kg-image" alt="D&#xF9;ng crontab &#x111;&#x1EC3; t&#x1EF1; &#x111;&#x1ED9;ng ch&#x1EA1;y task tr&#xEA;n Linux" loading="lazy"></figure><ul><li>M&#x1EDF; &#x111;&#x1EA7;u</li><li>Cron v&#xE0; crontab l&#xE0; g&#xEC;?</li><li>Crontab format</li><li>M&#x1ED9;t s&#x1ED1; v&#xED; d&#x1EE5;</li></ul><h3 id="m-u">M&#x1EDF; &#x111;&#x1EA7;u</h3><ul><li>B&#x1EA1;n nh&#x1EAD;n &#x111;&#x1B0;&#x1EE3;c y&#xEA;u c&#x1EA7;u backup database tr&#xEA;n server v&#xE0;o l&#xFA;c 1 gi&#x1EDD; s&#xE1;ng h&#xE0;ng ng&#xE0;y.</li><li>B&#x1EA1;n ph&#xE1;t hi&#x1EC7;n dung l&#x1B0;&#x1EE3;ng &#x1ED5; c&#x1EE9;ng tr&#xEA;n server c&#xF3; d&#x1EA5;u hi&#x1EC7;u b&#x1EA5;t th&#x1B0;&#x1EDD;ng. B&#x1EA1;n mu&#x1ED1;n log dung l&#x1B0;&#x1EE3;ng &#x1ED5; c&#x1EE9;ng m&#x1ED7;i 10 ph&#xFA;t.</li><li>B&#x1EA1;n mu&#x1ED1;n hi&#x1EC3;n th&#x1ECB; m&#x1ED9;t d&#xF2;ng nh&#x1EAF;c nh&#x1EDF; l&#xFA;c 18:00 t&#x1EEB; th&#x1EE9; Hai &#x111;&#x1EBF;n th&#x1EE9; S&#xE1;u:</li></ul><img src="https://blog.quangnv.com/content/images/2016/04/watch.jpg" alt="D&#xF9;ng crontab &#x111;&#x1EC3; t&#x1EF1; &#x111;&#x1ED9;ng ch&#x1EA1;y task tr&#xEA;n Linux"><p>Shut the f****** computer down and go home with your BEAR!</p><p>B&#x1EA1;n c&#xF3; th&#x1EC3; x&#x1EED; l&#xFD; c&#xE1;c c&#xF4;ng vi&#x1EC7;c <em>m&#x1EC7;t m&#x1ECF;i, nh&#xE0;m ch&#xE1;n, kh&#xF3; kh&#x103;n</em> tr&#xEA;n m&#x1ED9;t c&#xE1;ch t&#x1EF1; &#x111;&#x1ED9;ng v&#x1EDB;i crontab!</p><p>B&#xE2;y gi&#x1EDD; ch&#xFA;ng ta s&#x1EBD; c&#xF9;ng t&#xEC;m hi&#x1EC3;u cron v&#xE0; crontab l&#xE0; g&#xEC;.</p><h3 id="cron-v-crontab-l-g-">Cron v&#xE0; crontab l&#xE0; g&#xEC;?</h3><h4 id="cron-l-g-">Cron l&#xE0; g&#xEC;?</h4><p>Cron l&#xE0; m&#x1ED9;t daemon th&#x1EF1;c thi c&#xE1;c job (a.k.a task) &#x111;&#xE3; &#x111;&#x1B0;&#x1EE3;c l&#xEA;n l&#x1ECB;ch trong c&#xE1;c file crontab (cron table).</p><p>Cron t&#xEC;m ki&#x1EBF;m c&#xE1;c file crontab c&#x1EE7;a c&#xE1;c user trong th&#x1B0; m&#x1EE5;c <code>/var/spool/cron/crontabs</code> v&#xE0;o load v&#xE0;o memory. C&#xE1;c file crontab &#x111;&#x1B0;&#x1EE3;c &#x111;&#x1EB7;t t&#xEA;n gi&#x1ED1;ng v&#x1EDB;i t&#xEA;n user. Ch&#x1EB3;ng h&#x1EA1;n, user quangnv s&#x1EBD; c&#xF3; 1 file t&#xEA;n l&#xE0; quangnv.</p><pre><code>$ ls -l /var/spool/cron/crontabs
-rw------- 1 quangnv crontab 1133 Apr 12 08:59 quangnv
</code></pre><p><em>Ch&#xFA; &#xFD; l&#xE0; b&#x1EA1;n ch&#x1EC9; c&#x1EA7;n bi&#x1EBF;t s&#x1EF1; t&#x1ED3;n t&#x1EA1;i c&#x1EE7;a th&#x1B0; m&#x1EE5;c n&#xE0;y th&#xF4;i, kh&#xF4;ng n&#xEA;n tr&#x1EF1;c ti&#x1EBF;p thay &#x111;&#x1ED5;i n&#xF3;. Vi&#x1EC7;c &#x111;&#xF3; s&#x1EBD; do crontab command th&#x1EF1;c hi&#x1EC7;n.</em></p><p>Ngo&#xE0;i c&#xE1;c file crontab c&#x1EE7;a user nh&#x1B0; tr&#xEA;n, cron c&#xF2;n &#x111;&#x1ECD;c c&#xE1;c file crontab h&#x1EC7; th&#x1ED1;ng <code>/etc/crontab</code> v&#xE0; c&#xE1;c file trong th&#x1B0; m&#x1EE5;c <code>/etc/cron.d</code>.</p><p>Cron &#x111;&#x1B0;&#x1EE3;c k&#xED;ch ho&#x1EA1;t m&#x1ED7;i ph&#xFA;t, th&#x1EF1;c hi&#x1EC7;n c&#xE1;c job &#x111;&#xE3; load n&#x1EBF;u n&#xF3; &#x111;&#x1B0;&#x1EE3;c thi&#x1EBF;t l&#x1EAD;p &#x111;&#x1EC3; ch&#x1EA1;y &#x1EDF; th&#x1EDD;i &#x111;i&#x1EC3;m hi&#x1EC7;n t&#x1EA1;i. <br>Ngo&#xE0;i ra, cron c&#x169;ng th&#x1EF1;c hi&#x1EC7;n ki&#x1EC3;m tra c&#xE1;c th&#x1B0; m&#x1EE5;c crontab m&#x1ED7;i ph&#xFA;t m&#x1ED9;t l&#x1EA7;n. Cron s&#x1EBD; load c&#xE1;c file crontab &#x111;&#x1B0;&#x1EE3;c thay &#x111;&#x1ED5;i ho&#x1EB7;c th&#xEA;m m&#x1EDB;i. Do v&#x1EAD;y, ch&#xFA;ng ta kh&#xF4;ng c&#x1EA7;n restart cron serivce khi thay &#x111;&#x1ED5;i ho&#x1EB7;c th&#xEA;m m&#x1EDB;i c&#xE1;c job.</p><h4 id="crontab-command-l-g-">Crontab command l&#xE0; g&#xEC;?</h4><p>Crontab command &#x111;&#x1B0;&#x1EE3;c s&#x1EED; d&#x1EE5;ng &#x111;&#x1EC3; qu&#x1EA3;n l&#xFD; c&#xE1;c file crontab. M&#x1ED7;i user c&#xF3; m&#x1ED9;t file crontab trong <code>/var/spool/cron/crontabs</code>. C&#xE1;c job trong m&#x1ED7;i file crontab n&#xE0;y s&#x1EBD; &#x111;&#x1B0;&#x1EE3;c th&#x1EF1;c thi v&#x1EDB;i quy&#x1EC1;n c&#x1EE7;a user s&#x1EDF; h&#x1EEF;u n&#xF3;.</p><p>Xem danh s&#xE1;ch c&#xE1;c job &#x111;&#xE3; &#x111;&#x1B0;&#x1EE3;c thi&#x1EBF;t l&#x1EAD;p c&#x1EE7;a user hi&#x1EC7;n t&#x1EA1;i: &#xA0;</p><pre><code>$ crontab -l
</code></pre><p>X&#xF3;a c&#xE1;c job &#x111;&#xE3; &#x111;&#x1B0;&#x1EE3;c l&#xEA;n l&#x1ECB;ch: &#xA0;</p><pre><code>$ crontab -r
</code></pre><p>S&#x1EED;a file crontab (edit job list): &#xA0;</p><pre><code>$ crontab -e
</code></pre><p>Command n&#xE0;y s&#x1EBD; m&#x1EDF; editor m&#x1EB7;c &#x111;&#x1ECB;nh (vi, nano, ...) &#x111;&#x1EC3; b&#x1EA1;n th&#xEA;m/s&#x1EED;a/x&#xF3;a danh s&#xE1;ch cronjob. Ti&#x1EBF;p theo, ch&#xFA;ng ta s&#x1EBD; t&#xEC;m hi&#x1EC3;u v&#x1EC1; crontab format.</p><h3 id="crontab-format">Crontab format</h3><p>M&#x1ED7;i cronjob trong user crontab &#x111;&#x1B0;&#x1EE3;c vi&#x1EBF;t v&#x1EDB;i format sau: &#xA0;</p><pre><code>* * * * * /path/to/mycommand
</code></pre><p>5 d&#x1EA5;u sao b&#xEA;n tr&#xEA;n l&#x1EA7;n l&#x1B0;&#x1EE3;t th&#x1EC3; hi&#x1EC7;n cho:</p><ul><li>Ph&#xFA;t (0~59)</li><li>Gi&#x1EDD; (0~23)</li><li>Ng&#xE0;y trong th&#xE1;ng (1~31)</li><li>Th&#xE1;ng (1~12)</li><li>Ng&#xE0;y trong tu&#x1EA7;n (0~6, v&#x1EDB;i 0 l&#xE0; Ch&#x1EE7; nh&#x1EAD;t, ho&#x1EB7;c sun, mon, tue, ...)</li></ul><p>Nh&#x1B0; v&#x1EAD;y, &#x111;&#x1EC3; th&#x1EF1;c hi&#x1EC7;n <code>mycommand</code> v&#xE0;o l&#xFA;c 01:30 m&#x1ED7;i s&#xE1;ng Ch&#x1EE7; nh&#x1EAD;t th&#xEC; cronjob s&#x1EBD; &#x111;&#x1B0;&#x1EE3;c vi&#x1EBF;t nh&#x1B0; sau: &#xA0;</p><pre><code>30 1 * * 0 /path/to/mycommand
</code></pre><p>M&#x1ED7;i c&#x1ED9;t th&#x1EDD;i gian c&#xF2;n ch&#x1EA5;p nh&#x1EAD;n c&#xE1;c c&#xE1;ch vi&#x1EBF;t sau:</p><p><code>*</code> <br>&#x110;&#x1EA1;i di&#x1EC7;n cho t&#x1EA5;t c&#x1EA3; c&#xE1;c gi&#xE1; tr&#x1ECB; c&#xF3; th&#x1EC3;.</p><p><code>-</code> <br>Kho&#x1EA3;ng gi&#xE1; tr&#x1ECB;. V&#xED; d&#x1EE5;: gi&#xE1; tr&#x1ECB; <code>6-9</code> &#x1EDF; c&#x1ED9;t gi&#x1EDD; c&#xF3; ngh&#x129;a l&#xE0; th&#x1EF1;c hi&#x1EC7;n l&#xFA;c 6h, 7h, 8h, 9h.</p><p><code>,</code> <br>Li&#x1EC7;t k&#xEA; c&#xE1;c gi&#xE1; tr&#x1ECB;. V&#xED; d&#x1EE5;: <br><code>10,30,45</code> &#x1EDF; c&#x1ED9;t ph&#xFA;t c&#xF3; ngh&#x129;a l&#xE0; th&#x1EF1;c hi&#x1EC7;n &#x1EDF; c&#xE1;c ph&#xFA;t 10, ph&#xFA;t 30, ph&#xFA;t 45. K&#x1EBF;t h&#x1EE3;p <code>8-10,13-15,18</code> &#x1EDF; c&#x1ED9;t gi&#x1EDD; ngh&#x129;a l&#xE0; th&#x1EF1;c hi&#x1EC7;n l&#xFA;c 8h, 9h, 10h, 13h, 14h, 15h, 18h.</p><p><code>/</code> <br>B&#x1B0;&#x1EDB;c nh&#x1EA3;y. V&#xED; d&#x1EE5;: <br><code>*/15 8-12/2 * * *</code>: th&#x1EF1;c hi&#x1EC7;n l&#xFA;c 8:00, 8:15, 8:30, 8:45, 10:00, 10:15, 10:30, 10:45, 12:00, 12:15, 12:30, 12:45. L&#x1B0;u &#xFD; l&#xE0; b&#x1B0;&#x1EDB;c nh&#x1EA3;y s&#x1EBD; &quot;reset&quot; khi chuy&#x1EC3;n sang m&#x1ED1;c th&#x1EDD;i gian ti&#x1EBF;p theo. V&#xED; d&#x1EE5;: <br><code>*/25 8,9 * * *</code>: th&#x1EF1;c hi&#x1EC7;n l&#xFA;c 8:00, 8:25, 8:50, 9:00, 9:25, 9:50 (9:15, 9:40) <br><code>0 0 */3 * *</code>: th&#x1EF1;c hi&#x1EC7;n v&#xE0;o c&#x1EA3; ng&#xE0;y 31/5 v&#xE0; 1/6</p><p><strong>Ch&#xFA; &#xFD;:</strong> N&#x1EBF;u c&#x1EA3; c&#x1ED9;t <em>ng&#xE0;y trong th&#xE1;ng</em> v&#xE0; <em>ng&#xE0;y trong tu&#x1EA7;n</em> &#x111;&#x1EC1;u &#x111;&#x1B0;&#x1EE3;c g&#xE1;n gi&#xE1; tr&#x1ECB; kh&#xE1;c <code>*</code>, th&#xEC; job s&#x1EBD; &#x111;&#x1B0;&#x1EE3;c th&#x1EF1;c hi&#x1EC7;n khi ng&#xE0;y hi&#x1EC7;n t&#x1EA1;i th&#x1ECF;a m&#xE3;n &#xED;t nh&#x1EA5;t m&#x1ED9;t trong 2 gi&#xE1; tr&#x1ECB; &#x111;&#xF3;. <br>V&#xED; d&#x1EE5;: v&#x1EDB;i <code>0 5 1,15 * 1</code>, job s&#x1EBD; &#x111;&#x1B0;&#x1EE3;c th&#x1EF1;c hi&#x1EC7;n l&#xFA;c 5:00 v&#xE0;o c&#xE1;c ng&#xE0;y 1 v&#xE0; 15 h&#xE0;ng th&#xE1;ng <strong>v&#xE0;</strong> th&#x1EE9; Hai h&#xE0;ng tu&#x1EA7;n.</p><p><strong>C&#xE1;c chu&#x1ED7;i &#x111;&#x1EB7;c bi&#x1EC7;t</strong></p><p>Thay cho vi&#x1EC7;c nh&#x1EAD;p gi&#xE1; tr&#x1ECB; v&#xE0;o 5 c&#x1ED9;t th&#x1EDD;i gian, ch&#xFA;ng ta c&#xF3; th&#x1EC3; d&#xF9;ng c&#xE1;c chu&#x1ED7;i &#x111;&#x1EB7;c bi&#x1EC7;t sau:</p><ul><li><code>@reboot</code>: th&#x1EF1;c hi&#x1EC7;n m&#x1ED7;i khi kh&#x1EDF;i &#x111;&#x1ED9;ng.</li><li><code>@yearly</code>: th&#x1EF1;c hi&#x1EC7;n ng&#xE0;y 1/1 h&#xE0;ng n&#x103;m, gi&#x1ED1;ng <code>0 0 1 1 *</code>.</li><li><code>@annually</code>: gi&#x1ED1;ng <code>@yearly</code>.</li><li><code>@monthly</code>: th&#x1EF1;c hi&#x1EC7;n ng&#xE0;y 1 m&#x1ED7;i th&#xE1;ng, gi&#x1ED1;ng <code>0 0 1 * *</code>.</li><li><code>@weekly</code>: th&#x1EF1;c hi&#x1EC7;n v&#xE0;o ng&#xE0;y Ch&#x1EE7; nh&#x1EAD;t h&#xE0;ng tu&#x1EA7;n, gi&#x1ED1;ng <code>0 0 * * 0</code>.</li><li><code>@daily</code>: th&#x1EF1;c hi&#x1EC7;n l&#xFA;c n&#x1EED;a &#x111;&#xEA;m m&#x1ED7;i ng&#xE0;y, gi&#x1ED1;ng <code>0 0 * * *</code>.</li><li><code>@midnight</code>: gi&#x1ED1;ng <code>@daily</code>.</li><li><code>@hourly</code>: th&#x1EF1;c hi&#x1EC7;n m&#x1ED7;i gi&#x1EDD;, gi&#x1ED1;ng <code>0 * * * *</code>.</li></ul><h3 id="m-t-s-v-d-">M&#x1ED9;t s&#x1ED1; v&#xED; d&#x1EE5;</h3><p>Backup database v&#xE0;o l&#xFA;c 1 gi&#x1EDD; s&#xE1;ng h&#xE0;ng ng&#xE0;y &#xA0;</p><pre><code>0 1 * * * /usr/bin/backup_db.sh
</code></pre><p>Log dung l&#x1B0;&#x1EE3;ng &#x1ED5; c&#x1EE9;ng m&#x1ED7;i 10 ph&#xFA;t &#xA0;</p><pre><code>*/10 * * * * /usr/bin/disk_usage_script.sh &gt;&gt; disk.log
</code></pre><p>Hi&#x1EC3;n th&#x1ECB; m&#x1ED9;t d&#xF2;ng nh&#x1EAF;c nh&#x1EDF; l&#xFA;c 18:00 t&#x1EEB; th&#x1EE9; Hai &#x111;&#x1EBF;n th&#x1EE9; S&#xE1;u: &#xA0;</p><pre><code>0 18 * * 1-5 echo &apos;Shutdown the computer and go home&apos; &gt; /dev/pts/0
</code></pre><p>G&#x1EED;i email ch&#xFA;c m&#x1EEB;ng 20/10 t&#x1EDB;i c&#xE1;c b&#x1EA1;n n&#x1EEF; &#xA0;</p><pre><code>0 8 20 10 * /usr/bin/send_women_day_email.sh
</code></pre><p>Bonus: <br><a href="http://crontab.guru/?ref=blog.quangnv.com">http://crontab.guru/</a></p>]]></content:encoded></item></channel></rss>