def createTask(self): import json task = Task() task.run_time = json.dumps({'minutes':10}) task.name = 'name' task.run_entry = self.url return task
def generateTask(self): task = Task() task.name = 'Task1' task.run_time = '{"days":0, "hours":0, "minutes":10, "seconds":0}' task.run_entry = 'http://baidu.com' task.run_method = 'post' task.active = 1 return task