Skip to content

Commit b43c482

Browse files
committed
feat: add task scheduler for repitetive tasks
1 parent 64ef5c5 commit b43c482

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

task_scheduler/task_scheduler.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import time
22
import schedule
33

4+
45
def task():
56
print("Task is being executed")
67

8+
79
def task2():
810
print("Another task is being executed")
911

12+
1013
def run_tasks():
1114
schedule.every(1).minutes.do(task)
1215
schedule.every(2).minutes.do(task2)
@@ -15,5 +18,6 @@ def run_tasks():
1518
schedule.run_pending()
1619
time.sleep(1)
1720

21+
1822
if __name__ == "__main__":
1923
run_tasks()

0 commit comments

Comments
 (0)