At first install skpy
pip install SkPy
Then find out the group id of Your Skype
from skpy import Skype
sk = Skype("email","password")
channel = sk.chats.recent()
print(channel)
Then create a file named skype.py and paste this code with your credential
from skpy import Skype
def post_message(msg,channel_id):
"Post a message"
sk = Skype("email","password")
channel = sk.chats.chat(channel_id)
channel.sendMsg(msg)
print("Message Sent")
Now, create a cron job in your linux machine
crontab -e
0 8 * * 1-5 python3 /home/your_username/skype.py
This cron expression willl send message to your group on Monday to Friday at 8.00 AM
You can change the cron expression according to your needs. You need to keep your linux machine on for this task.
0 comments:
Post a Comment