So, I created this exciting method, job().change_func(), because I think it would be cool to allow the users to change the job's function in a more implicit way, and, it also helps to keep the function metadata. Take a look:
def hello(name):
print(f'Hello, {name}!')
sch = schedule.every().second.do(hello, 'folks')
while True:
if timer >= 10:
sch.change_func(hello, 'friends') # Right here
schedule.run_pending()
But what do you guys think? Sorry for anything, it's my first time contributing :)
So, I created this exciting method,
job().change_func()
, because I think it would be cool to allow the users to change the job's function in a more implicit way, and, it also helps to keep the function metadata. Take a look:But what do you guys think? Sorry for anything, it's my first time contributing :)