Google App Engine Cron sample code

cron:
- description: cron monitor
  url: /report/cron
  schedule: every 1 minutes
#!/usr/bin/env python

import urllib2

# from google.appengine.api import urlfetch  

print 'Content-Type: text/plain'
print ''

try:
  urllib2.urlopen('http://www.abc.com/queuescanner.php')
except:
  print 'queuescanner except'

try:
  urllib2.urlopen('http://www.abc.com/cron.php')
except:
  print 'urlopen except'

# urlfetch.fetch('http://www.abc.com/queuescanner.php')
# urlfetch.fetch('http://www.abc.com/cron.php')

print 'OK'

One Response to “Google App Engine Cron sample code”

  1. GoPiano says:

    GoPiano…

    Hello ;) Thanks heaps for this indeed!… if anyone else has anything, it would be much appreciated. Great website Super Piano Links http://www.en.Grand-Pianos.org Enjoy!…

Leave a Reply

You must be logged in to post a comment.