Do you have any feature for scheduling? Which would be similar to Quantopian schedule_function?

No. The main products that quantopian trades are US equities and they have clear market open and close time. Therefore, quantopian provides schedule_function either before market opens or after market closes. In IBridgePy, you can trade any securities or commodities that IB supports and they may have totally different trading hours. The solution is to make your own schedule_functions.

Please see the follow example. Something is scheduled before market opens and something else is scheduled after market closes.

def handle_data(context, data):
    sTime=get_datetime() 
    # sTime is the IB server time. 
    if sTime.weekday()<=4:  # Only trade from Mondays to Fridays
        if sTime.hour==9 and sTime.minute==29 and context.machineState=='sleep':
            # schedule actions before market opens at 9:29AM EST
            do_something()
            context.machineState='idle'
        
        if sTime.hour==15 and sTime.minute==59 and context.machineState=='idle':
            # do thing during trading hours
            do_something_else()
            context.machineState='afterTrade'

        if sTime.hour==16 and sTime.minute==10 and context.machineState=='afterTrade':
            display_results()
            context.machineState='sleep'