linux系统自动执行写好的脚本
先执行:crontab -e
然后复制以下命令:每个月的1日1时XX分执行相应的脚本命令
1 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/ClinicalTrialsApi.py /home/ccxiong/clinicalTrialData/dataUpdateMonthly/earlyPhase1.txt "early phase 1"
6 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/ClinicalTrialsApi.py /home/ccxiong/clinicalTrialData/dataUpdateMonthlyphase1.txt "phase 1"
11 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/ClinicalTrialsApi.py /home/ccxiong/clinicalTrialData/dataUpdateMonthly/phase2.txt "phase 2"
17 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/ClinicalTrialsApi.py /home/ccxiong/clinicalTrialData/dataUpdateMonthly/phase3.txt "phase 3"
22 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/ClinicalTrialsApi.py /home/ccxiong/clinicalTrialData/dataUpdateMonthly/phase4.txt "phase 4"
27 1 1 * * /usr/bin/bash /home/ccxiong/clinicalTrialData/c.sh
32 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/quchongfu.py /home/ccxiong/clinicalTrialData/dataUpdateMonthly/all-tmp.txt /home/ccxiong/clinicalTrialData/dataUpdateMonthly/all-tmp-quchongfu.txt
37 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/cleanDate-step0.py //home/ccxiong/clinicalTrialData/dataUpdateMonthly/all-tmp-quchongfu.txt /home/ccxiong/clinicalTrialData/dataUpdateMonthly/1.txt
42 1 1 * * /usr/bin/bash /home/ccxiong/clinicalTrialData/cleanDate-step1.sh /home/ccxiong/clinicalTrialData/dataUpdateMonthly/1.txt /home/ccxiong/clinicalTrialData/dataUpdateMonthly/2.txt
44 1 1 * * ~/anaconda3/bin/python /home/ccxiong/clinicalTrialData/str2Date.py /home/ccxiong/clinicalTrialData/dataUpdateMonthly/2.txt /home/ccxiong/clinicalTrialData/dataUpdateMonthly/3.txt