Automatically create Daily Notion Tasks by windows task scheduler

We introduced how to automatically create daily automation by Jenkins In last artical http://nightwish.tech/2022/10/01/DailyTaskCreationByJenkins ,If you wouldn’t like to install jenkins in your laptop. you could automatically call python package to create your daily Notion task by windows task scheduler.

Steps:

  1. Install Python https://www.python.org/downloads/ ,Python version>3.9

  2. Download NotionRecurringTask project from github nightwish2016/NotionRecurringTask (github.com)

  3. Open Main.py and Update “XXX” to appropriate values,Details please refer page 创建重复性的Notion任务以及自动更新任务状态 | NightWish
    1
    2
    3
    4
    5
    6
    7
    8
    from NotionRecurringTask.RecurringTask import RecurringTask

    if __name__ == "__main__":
    auth="XXX"
    taskConfiguration_dabaseid='XXXXX'
    databaseid='XXX'
    knotion=RecurringTask()
    knotion.process(auth,taskConfiguration_dabaseid,databaseid)
  1. Open Task scheduler and create a task:
    image-20220930104926475
    image-20220930105545991

    image-20220930105159797

  1. The Daily notion Tasks will be created on 9AM everyday if your computer doesn’t shut down

  2. If you don’t want to create daily notion task by windows task scheduler, You could manually run the python script in cmd as below:

    1
    python main.py