之前在測試 Python 爬蟲時寫了一些程式, 分別部署在三台 Linux 主機上 (兩台 Pi 3, 一台 Pi 3A+, 以及一台 Mapleboard), 時間一久都不清楚到底哪隻爬蟲放在哪, 要維護或改版還得一台一台去檢視 crontab 很花時間, 今天抽空將它們整理如下 :
1. 鄉下老家的 Pi 3 :
pi@raspberrypi:~ $ sudo crontab -e
0 * * * * sudo /usr/local/bin/checkwifi.sh
0 * * * * /usr/bin/python3 /home/pi/reportip5.py
pi@raspberrypi:~ $ crontab -e
*/6 * * * * curl -s https://serverless-fdof.onrender.com/function/hello > /dev/$
2. 高雄家的 Pi 3 :
pi@raspberrypi:~ $ crontab -e
0 16 * * 1-5 /usr/bin/python3 /home/pi/twstock_dashboard_update.py
*/31 9-13 * * 1-5 /usr/bin/python3 /home/pi/yahoo_twstock_monitor_table_2.py
0 8,18 * * * /usr/bin/python3 /home/pi/btc_eth_prices_line_notify.py
1 12,17 * * * /usr/bin/python3 /home/pi/technews_3.py
0 9 * * * /usr/bin/python3 /home/pi/books.com.tw_66_telegram.py
0 * * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py faxxxxxx yyyyyy
4 * * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py xxxx118 yyyyyy
8 * * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py xxxx119 yyyyyy
12 * * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py xxxx120 yyyyyy
16 * * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py xxxx1792 yyyy
20 * * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py xxxxxxx587 yyy110
0 13,18 * * * /usr/bin/python3 /home/pi/ksml_personal_11_deploy.py
0 6,16 * * * /usr/bin/python3 /home/pi/nkust_lib_9.py
*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1
*/6 * * * * curl -s https://serverless-fdof.onrender.com/function/hello > /dev/$
3. 高雄家的 Pi 3 A+ : (已改為 Trixie Lite OS)
pi@raspberrypi:~ $ crontab -e
*/3 * * * * curl -s https://serverless-fdof.onrender.com/function/hello
*/3 * * * * curl -s https://serverless-5e6i.onrender.com/function/hello
4. Mapleboard :
tony1966@LX2438:~/python$ crontab -e
#0 5,16 * * * /usr/bin/python3 /home/tony1966/python/ksml_books_8.py
#0 10 * * * /usr/bin/python3 /home/tony1966/python/nkust_lib_6.py
舊版爬蟲已停止.
最近會進行爬蟲改版 (crontab 動態調整中), 爬蟲盡量部署在樹莓派, 蒐集的資料再統一彙整到 Mapleboard, 由 Mapleboard 推送訊息至 LINE 與 Telegram.
沒有留言 :
張貼留言