How to make a Python script run at an automatic time?

Asked

Viewed 21 times

1

Hi I made a script to send messages in Skype:

from skpy import Skype
sk = Skype(username, password) # connect to Skype

sk.user # you
sk.contacts # your contacts
sk.chats # your conversations

ch = sk.chats.create(["joe.4", "daisy.5"]) # new group conversation
ch = sk.contacts["joe.4"].chat # 1-to-1 conversation

ch.sendMsg(content) # plain-text message
ch.sendFile(open("song.mp3", "rb"), "song.mp3") # file upload
ch.sendContact(sk.contacts["daisy.5"]) # contact sharing

ch.getMsgs() # retrieve recent messages

I want to make this code run automatically every day at 9:00 am, someone can help me with some advice on how to do or indicate a documentation to search, I’ve searched the internet a lot and found nothing.

  • 2

    use a task manager of the operating system itself to do this, it can run your program at scheduled time

  • 2

    Terms like Scheduler (scheduler) or Schedule (schedule) also help to find a solution for your operating system. On Linux for example has the cron. You can include terms like task, job or script, possibly a shell script.

  • Answer yes! I’ll take a look to see how I implement this in practice, thank you very much!!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.