Add wakeup.py
This commit is contained in:
parent
f5ace079de
commit
b35672b98a
14
wakeup.py
Normal file
14
wakeup.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import schedule
|
||||||
|
import time
|
||||||
|
from wakeonlan import send_magic_packet
|
||||||
|
|
||||||
|
def send_magic_packet_to_pc():
|
||||||
|
pc_mac_address = 'xx:xx:xx:xx:xx:xx'
|
||||||
|
send_magic_packet(pc_mac_address)
|
||||||
|
print(f"Magic packet sent")
|
||||||
|
|
||||||
|
schedule.every().day.at("03:00").do(send_magic_packet_to_pc)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
schedule.run_pending()
|
||||||
|
time.sleep(1)
|
Loading…
Reference in a new issue