(self, sobject)
<task class="TestTask">
          <type>interval</type>
          <interval>10</interval>
        </task>
<task class="TestTask">
          <type>interval</type>
          <interval>10</interval>
        </task>
<task class = TestTask > <type > interval< / type > <interval > 10< / interval > < / task >
def add_sobject(self, sobject):

        '''
        <task class="TestTask">
          <type>interval</type>
          <interval>10</interval>
        </task>
        '''

        type = "interval"
        class_name = "TestTask"

        options = {
            "interval": 10
        }

        if type == "interval":
            task = Common.create_from_class_path(class_name)
            scheduler.add_interval_task(task, **options)
        elif type == "daily":
            task = Common.create_from_class_path(class_name)
            scheduler.add_daily_task(task, **options)
        elif type == "weekly":
            task = Common.create_from_class_path(class_name)
            scheduler.add_weekly_task(task, **options)
def add_sobject ( self , sobject ) : type = "interval" class_name = "TestTask" options = { "interval" : 10 } if type == "interval" : task = Common . create_from_class_path ( class_name ) scheduler . add_interval_task ( task , * * options ) elif type == "daily" : task = Common . create_from_class_path ( class_name ) scheduler . add_daily_task ( task , * * options ) elif type == "weekly" : task = Common . create_from_class_path ( class_name ) scheduler . add_weekly_task ( task , * * options )