当前位置:网站首页>宝塔计划任务执行周期设置【秒】为定时单位【或者更小】
宝塔计划任务执行周期设置【秒】为定时单位【或者更小】
2022-08-11 10:35:00 【蓝枫秋千】
前言
在宝塔的默认执行周期中,最小时间位为【分钟】
那么如果我们想尽可能的高频率的触发如何操作呢?
步骤
- 先建立一个shell脚本任务,执行周期任选
- 脚本内容设置为如下
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH step=1 for (( i = 0; i < 60; i=(i+step) )); do curl -sS --connect-timeout 10 -m 60 'www.baidu.com' echo "----------------------------------------------------------------------------" endDate=`date +"%Y-%m-%d %H:%M:%S"` echo "*[$endDate] Successful" echo "----------------------------------------------------------------------------" sleep $step done exit 0
说明
:
1.step
为要周期执行的秒数(如果想要更小,根据内容自行调整)
2.www.baidu.com
为要调用的接口,或者要执行的操作,视你本身情况而定 - 保存编辑,并发布
- 【关键的来了】需要手动执行一遍
- 搞定!
边栏推荐
- dreamweaver网页设计作业制作 学生个人网页猫眼电影 WEB静态网页作业模板 大学生个人主页博客网页代码 dw个人网页作
- 保证金监控中心保证期货开户和交易记录
- 神经网络需要的数学知识,神经网络的数学基础
- Neuropathic pain classification picture Daquan, neuropathic pain classification
- MySQL数据库基础01
- WooCommerce Ecommerce WordPress Plugin - Make American Money
- 【Prometheus】Alertmanager告警全方位讲解
- 神经痛分类图片大全,神经病理性疼痛分类
- 你必须懂的一些MySQL索引技巧
- 打印时间的各种格式
猜你喜欢
【Mysql系列】03_系统设计
Primavera Unifier - AEM Form Designer Essentials
SAP Product Enhancement Technology Review
How to improve the efficiency of telecommuting during the current epidemic, sharing telecommuting tools
Simple implementation of a high-performance clone of Redis using .NET (seven-end)
[Central Task Scheduling System - Communication Development]
保证金监控中心保证期货开户和交易记录
Install nodejs
神经网络图怎么分析,画神经网络结构图
Jetpack Compose学习(9)——Compose中的列表控件(LazyRow和LazyColumn)
随机推荐
MySQL表sql语句增删查改_修改_删除
Adobe LiveCycle Designer report designer
Calculate the sum of an element of an array
你必须懂的一些MySQL索引技巧
1.TCP/IP基础知识
[UE] 入坑
一站式PCBA组装加工有哪些环节?
HDRP shader gets pixel depth value and normal information
错误代码: 1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current
27岁了,目前从事软件测试,听些老一辈的人说测试前途是IT里最差的,是这样吗?
全新FIDE 编译简单评测
假设检验:正态性检验的那些bug——为什么对同一数据,normaltest和ktest会得到完全相反的结果?
logstash/filebeat only receives data from the most recent period
运动健康服务场景事件订阅,让应用推送“更懂用户”
【应用SLAM技术建立二维栅格化地图】
当科学家决定搞点“花里胡哨”的东西
网络流行简笔画图片大全,关于网络的简笔画图片
阿里内网疯传的P8“顶级”分布式架构手册被我拿到了
Convolutional Neural Network Gradient Vanishing, The Concept of Gradient in Neural Networks
Ali Ermian: Do you know how to tune the JVM?