自定义实现简易定时任务

#!/bin/bash
ms=`date +%-H%M`
if ((10#$1 <= 10#$ms));then
  echo "future time,please"
  exit 0
fi
while ((10#$1 != 10#$ms))
do
  ms=`date +%H%M`
  if ((10#$1-10#$ms>1));then
    sleep 59s
  else
    sleep 1s
  fi
done
jmeter -n -t $2 -l $1.jtl -j $1.log

 

posted @ 2020-06-30 19:59  Mosicol  Views(341)  Comments(0Edit  收藏  举报