bat 执行定时python 打开url 谁搞过,帮忙看一下语句有什么问题
bat 文件内容c:
cd C:\share\CDMP\WebUI\Job\openurl
python openurl.py
openurl.py 文件内容
# -*- coding: utf-8 -*-
# file openurl.py
"""
用于访问页面并将还回的页面保存
"""
import urllib
import datetime
from settings import *
ERR_CHARACTER = U"远程主机易做图关闭"
def vist_url(url):
print url
response = urllib.urlopen(url)
response.read()
def vist_urls():
for url in urls:
vist_url(url)
if __name__ == "__main__":
vist_urls()
print 'Done'
settings.py 文件内容
# -*- coding: utf-8 -*-
# file settings.py
urls=('http://rdm-test.h3c.com/RunDaily.aspx?task=pdm',
'http://rdm-test.h3c.com/RunDaily.aspx?task=part',
'http://rdm-test.h3c.com/RunDaily.aspx?task=email',
'http://rdm-test.h3c.com/RunDaily.aspx?task=update',
'http://rdm-test.h3c.com/RunDaily.aspx?task=user',
#'some other urls ... ',
)
#retry times when failed
max_retry = 5
现在问题是没有执行,好像报错了,但看不到报错信息,那个高手看一下
补充:.NET技术 , 其他语言