python 访问php程序,实现定时

#!/usr/bin/python
#test2.py
import sys
import urllib2
j = True
jj = 1
##########用于统计,所以分页, url = 'http://localhost/acb/index.php?page=%s' while j: r = urllib2.urlopen(url %(jj),timeout=40).read() print 'r=%s' %(r)    ####根据返回值,判断是否要继续执行 if r == 'ok': j = False print 'complete' jj = jj+1 print jj