You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
384 B
20 lines
384 B
1 year ago
|
from datetime import datetime
|
||
|
|
||
|
|
||
|
def job(*args, **kwargs):
|
||
3 months ago
|
"""
|
||
|
定时任务执行同步函数示例
|
||
|
"""
|
||
1 year ago
|
print(args)
|
||
|
print(kwargs)
|
||
3 months ago
|
print(f'{datetime.now()}同步函数执行了')
|
||
|
|
||
|
|
||
|
async def async_job(*args, **kwargs):
|
||
|
"""
|
||
|
定时任务执行异步函数示例
|
||
|
"""
|
||
|
print(args)
|
||
|
print(kwargs)
|
||
|
print(f'{datetime.now()}异步函数执行了')
|