run_t0.sh 570 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. run_mode=""
  3. if(($#==1))
  4. then
  5. run_mode=$1
  6. else
  7. exit -1
  8. fi
  9. if [[ "$run_mode" != "run" ]]
  10. then
  11. exit -1
  12. fi
  13. dd=$(date +%Y%m%d)
  14. start_date=$dd
  15. end_date=$start_date
  16. start_hour=00
  17. end_hour=23
  18. # 0. abs path
  19. abs_path=$(cd `dirname $0`; pwd)
  20. log_file="${abs_path}/logs/${dd}_t0.log"
  21. # 1. make data
  22. table=dwd_recsys_alg_sample_all_20250905
  23. make_sh="${abs_path}/make_data.sh"
  24. echo `date` "sh +x $make_sh $start_date $end_date $start_hour $end_hour $table" >> $log_file
  25. sh +x $make_sh $start_date $end_date $start_hour $end_hour $table >> $log_file 2>&1 &
  26. wait