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:
Install Python https://www.python.org/downloads/ ,Python version>3.9
Download NotionRecurringTask project from github nightwish2016/NotionRecurringTask (github.com)
- Open Main.py and Update “XXX” to appropriate values,Details please refer page 创建重复性的Notion任务以及自动更新任务状态 | NightWish
1
2
3
4
5
6
7
8from NotionRecurringTask.RecurringTask import RecurringTask
if __name__ == "__main__":
auth="XXX"
taskConfiguration_dabaseid='XXXXX'
databaseid='XXX'
knotion=RecurringTask()
knotion.process(auth,taskConfiguration_dabaseid,databaseid)
Open Task scheduler and create a task:
The Daily notion Tasks will be created on 9AM everyday if your computer doesn’t shut down
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