import time
import datetime
from playsound import playsound # optional - if you want sound
# If you don't have playsound: pip install playsound
PHRASE = "āļāļ āļģāˇāļ¸āˇ āļģāˇāļ¸āˇ āˇāļģāˇāļąāˇ āļ
āļ¸āļģāˇāˇāļģāˇāļē āˇāˇāļ¯āˇāļ°āˇ āļāˇāˇāˇāˇāˇāļ"
def wait_until_911():
while True:
now = datetime.datetime.now()
# Today's 9:11 AM
target = now.replace(hour=9, minute=11, second=0, microsecond=0)
# If we already passed 9:11 today â wait for tomorrow's 9:11
if now > target:
target = target.replace(day=now.day + 1)
# handle month/year rollover automatically by datetime
seconds_to_wait = (target - now).total_seconds()
if seconds_to_wait <= 0:
break
hours = int(seconds_to_wait // 3600)
mins = int((seconds_to_wait % 3600) // 60)
secs = int(seconds_to_wait % 60)
print(f"Waiting until 9:11 AM ... ({hours:02d}h {mins:02d}m {secs:02d}s left)")
time.sleep(min(300, seconds_to_wait)) # sleep max 5 min at a time
def chant_108_times():
print("\n" + "="*60)
print(" 9:11 AM - Starting 108 chants")
print("="*60 + "\n")
for i in range(1, 109):
print(f"{i:3d} | {PHRASE}")
# Optional: add very short delay between chants
# time.sleep(0.6)
# or play a short bell sound:
# try: playsound("bell.mp3") # you need to have bell.mp3 file
print("\n" + "â"*60)
print(" 108 āļĸāļ´āļē āˇāļ¸āˇāļ´āˇāļģāˇāļĢāļē⎠â")
print("â"*60 + "\n")
# ââââââââââââââââââââââââââââââââââââââââââââââââ
# Main program
# ââââââââââââââââââââââââââââââââââââââââââââââââ
print("Mantra chanting scheduler started...")
print("Will automatically chant at 9:11 AM every day\n")
while True:
wait_until_911()
chant_108_times()
# After finishing, sleep a bit so we don't instantly check again
time.sleep(60)