請問如何排程固定5分鐘執行網頁PHP檔?
請問如何排程固定5分鐘執行網頁PHP檔?
會用crontab喵?
whereis php看一下執行檔路徑
然後...
/usr/bin/php /root/test.php
或者是...
用curl或wget或lynx一類的工具去做瀏覽器的動作
/usr/bin/curl -s http://tw.yahoo.com >/dev/null
*/5 * * * * 執行程式的帳號 被執行程式的完整路徑 [被執行程式的參數]
例如
*/5 * * * * root /bin/mrtg /etc/mrtg/mrtg.cfg
*/5 * * * * root /var/www/html/test.php
書籤