gawel / aiocron

Crontabs for asyncio
MIT License
338 stars 20 forks source link

support kwargs into the `args` #36

Closed liho00 closed 1 year ago

liho00 commented 1 year ago

def echo_func(test=0, another=2): print(test, another)

aiocron.crontab(' /3', func=echo_func, args=(test=0, another=2),), start=True)

expected result support kwargs and args both

current result unable to pass kwargs to echo_func

gawel commented 1 year ago

use https://docs.python.org/3/library/functools.html#functools.partial