查看用過的指令
history
定時(shí)執(zhí)行腳本
crontab -e
分 時(shí) 日 月 周 編譯器絕對(duì)路徑 文件絕對(duì)路徑
每六小時(shí)執(zhí)行一次
0 */6 * * * /usr/bin/python3 /a.py
程序后臺(tái)運(yùn)行
我寫了一個(gè)while True 然后終端一關(guān)程序就停了
nohup python3 data_redis/bmBTCUSD1d.py > /dev/null 2>&1 &
解決
查看所有運(yùn)行的進(jìn)程
ps -A
ps aux
查看機(jī)器配置
df -h
查看內(nèi)存的使用
free -m
查看cpu使用情況
top
nohup python3 /home/centos/tamc-hunter/run.py >> /home/centos/logs/$(date +%Y%m%d)-fffffishcoming.log 2>&1 &
一個(gè)日志文件 每天一個(gè)新的