crond定时任务
# 添加定时任务
crontab -e
# 运行jmeter定时任务
#*/30 * * * * /bin/sh /home/test_tool/apache-jmeter-5.1/bin/jmeter.sh -n -t /home/test_tool/testdata/jmx/YYTV310-116-1hour.jmx -R 10.40.7.54:1099,10.40.7.15:1098 -l /home/test_tool/testdata/jmx/1109-1830-200.jtl
# 查看当前任务
crontab -l
# 查看日志(/var/log/cron)
tail -f /var/log/cron
# 查看启动状态
service crond status
# 营业厅稳定性测试jmeter脚本 #20 */1 * * * /bin/sh /home/test_tool/apache-jmeter-5.1/bin/jmeter.sh -n -t /home/test_tool/testdata/jmx/HNYYT-116-1hour.jmx -R 10.40.7.15:1098 -l /home/test_tool/testdata/jmx/HNYYT-0222-1020-100.jtl >> /home/test_tool/testdata/jmx/jmeter_run.log 2>&1 # 营业厅稳定性测试python质检发送脚本 #40 */1 * * * python3 /home/test_tool/testdata/yyt_count.py >> /home/test_tool/testdata/hnyyt_count.py.log 2>&1 #30 */1 * * * /usr/bin/python3 /home/test_tool/testdata/wh_count.py >> /home/test_tool/testdata/content/whcount.log 2>&1 #*/5 * * * * /bin/sh /data/engine/yueyu/server/tuling-asrc/check_port_status.sh /data/engine/yueyu/server/tuling-asrc/bin 33721 start.sh daemon #装维稳定性统计 * */1 * * * python3 /home/test_tool/yyt_count.py >> /home/test_tool/content/count.py.log 2>&1 #装维稳定性: 34 17 * * * python3 /data/ljx/zw_app_sbc/app_interface1.py >> /home/test_tool/content/app_interface1.py.log 2>&1 #assistant
# 按秒发送
*/1 * * * * sleep 10 && /bin/sh /home/test_tool/apache-jmeter-5.1/bin/jmeter.sh -n -t /home/test_tool/testdata/assistant/jmx/1.jmx -l /home/test_tool/testdata/assistant/jmx/chatflow-40-1.jtl >> /home/test_tool/testdata/assistant/jmx/1.log 2>&1
44 15 * * * /bin/sh /home/test_tool/apache-jmeter-5.1/bin/jmeter.sh -n -t /home/test_tool/testdata/assistant/jmx/1.jmx -l /home/test_tool/testdata/assistant/jmx/0309/chatflow-40-1.jtl >> /home/test_tool/testdata/assistant/jmx/0309/1.log 2>&1
参考文档: