```
1. 首先我们进入宝塔面板
2. 随后我们找到右侧的计划任务点击进去
3. 任务类型选择Shell脚本
4. 执行周期为 N分钟 1 分钟
5. 脚本内容为一下的脚本内容
```
![](https://img.kancloud.cn/f7/cb/f7cb0778f09b45ef02f889b70cbb4e97_1247x504.png)
## 微信监控脚本
~~~
#!/bin/bash
step=5 #间隔的秒数,不能大于60
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 'http://你的域名/api/wechat/index'
echo "----------------------------------------------------------------------------"
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
echo "----------------------------------------------------------------------------"
sleep $step
done
exit 0
~~~
## 支付宝监控脚本
~~~
step=10 #间隔的秒数,不能大于60
for (( i = 0; i < 60; i=(i+step) )); do
curl --insecure -sS --connect-timeout 10 -m 60 'https://你的域名/api/cron/alipay'
echo "----------------------------------------------------------------------------"
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★\[$endDate\] Successful"
echo "----------------------------------------------------------------------------"
sleep $step
done
exit 0
~~~