def cron(): stories = topstories() chunks = chunkify(stories, 20) for chunk in chunks: deferred.defer(task, chunk) return 'OK'