Skip to content
Advertisement

Send WhatsApp message every 24 hours

I want to send a WhatsApp message every 24 hours automatically using python, with the pywhatkit library. Here is the code I got so far:

import pywhatkit

pywhatkit.sendwhatmsg("+91xxxxxxxxxx", "Hello, world", 16, 00)

Send every 24 hours adaptation:

import pywhatkit
import time
   
while True:
    time.sleep(86400) #86400 seconds in a day
    pywhatkit.sendwhatmsg("+91xxxxxxxxxx","Hello, world", 16, 00)

I would have to keep my PC on 24/7 for this to work. Is there any better way of doing it?

Advertisement

Answer

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement