【苹果CMS定时任务】宝塔shell苹果CMS v8脚本
自己在宝塔里添加计划任务,写入代码就可以了。自己修改自己的定时URL,参考地址:影视大全_影视大全高清版_影视大全免费追剧_电影天堂_电影天堂高清版 热血影院#!/bin/bash#定时任务列表,从系统-定时任务配置,获取链接web_api=('http://www.rxdvd.com/inc/timming.php?m=wujin''http://www.rxdvd.com/inc/timming.php?m=collect''http://www.rxdvd.com/inc/timming.php?m=nomake''http://www.rxdvd.com/inc/timming.php?m=baidu''http://www.rxdvd.com/inc/timming.php?m=google''http://www.rxdvd.com/inc/timming.php?m=day''http://www.rxdvd.com/inc/timming.php?m=type''http://www.rxdvd.com/inc/timming.php?m=make_index')#以下无需修改,默认即可web_ua="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"#开始执行function get_cj() {cResult=$(curl --connect-timeout 1200 -m 60000 -k -s -L -A "$web_ua" "$1" )echo -e $cResult}#脚本入口echo "苹果CMS自动采集脚本开始执行 版本:v1.0"starttime=$(date +%s)for url in ${web_api[@]}; do if [[ ! -z $url ]] then echo "开始执行:$url" get_cj $url fi doneendtime=$(date +%s)echo "============================"echo "执行结束-->耗时$秒"echo "============================"
页:
[1]