python 定时每日任务

1.day_of_week = '0-6' # mon-sun

2.同时结合<自动打卡>,可将定时计划替换为该python脚本实现

3.详细介绍可以参考 <枫飞飞>

from apscheduler.schedulers.blocking import BlockingScheduler


def job():
    print("hello")


if __name__ == '__main__':
    # BlockingScheduler
    scheduler = BlockingScheduler()
    scheduler.add_job(job, 'cron', day_of_week='0-6', hour=7, minute=35)
    scheduler.start()

猜你喜欢

转载自blog.csdn.net/qq_41854291/article/details/107912666