Skip to content

Commit

Permalink
feat: add task scheduler for repitetive tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Acuspeedster committed Oct 14, 2024
1 parent 64ef5c5 commit b43c482
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions task_scheduler/task_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import time
import schedule


def task():
print("Task is being executed")


def task2():
print("Another task is being executed")


def run_tasks():
schedule.every(1).minutes.do(task)
schedule.every(2).minutes.do(task2)
Expand All @@ -15,5 +18,6 @@ def run_tasks():
schedule.run_pending()
time.sleep(1)


if __name__ == "__main__":
run_tasks()

0 comments on commit b43c482

Please sign in to comment.