開發html
mac 定時任務:vue
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!-- launchctl load com.zuing.epid.plist --> <!-- launchctl start com.zuing.epid.plist --> <plist version="1.0"> <dict> <key>Label</key> <string>com.zuing.epid.plist</string> <key>ProgramArguments</key> <array> <string>/Users/***/Documents/spider/epid.sh</string> </array> <key>StartCalendarInterval</key> <dict> <key>Minute</key> <integer>0</integer> <key>Hour</key> <integer>7</integer> </dict> <key>StartInterval</key> <integer>600</integer> <key>StandardOutPath</key> <string>/Users/zuing/Documents/spider/log</string> <key>StandardErrorPath</key> <string>/Users/zuing/Documents/spider/log</string> </dict> </plist>
sh代碼python
#!/bin/sh echo '######## ' `date '+%Y-%m-%d %H:%M:%S'` '########' >> /Users/***/spider/log && osascript -e 'display notification "正在獲取疫情信息" with title "獲取疫情" subtitle "......"' # 這裏用launchctl,前面要加encode PYTHONIOENCODING=utf-8 /usr/local/bin/python3 /Users/***/spider/s2.py >>/Users/***spider/log echo '######## done ########\n' >> /Users/***/spider/log
* `0,15,30,45 7-11 * * * /Users/****/epid.sh` * 這裏當mac睡眠黑屏的時候沒有網絡,就沒法運行該腳本,仍是沒有解決,請知道的朋友告訴一下。 * 公衆號推送和圖表vue+echarts * vue使用echarts ``` # mail.js里加載 import echarts from 'echarts' Vue.prototype.$echarts = echarts # 在vue裏就能夠用了 this.myChart = this.$echarts.init(document.getElementById('chart')); ```
留下2個問題未解決linux
原來怎麼沒有作過爬蟲項目,也沒用過python,經過這幾天學習到了git
pycookiecheat 獲取本地chrome的cookiegithub