Hi, Recently I Have Learned To Automate Things And Tasks With Python To Make My Tasks Easier… But The Problem Is I Cannot Keep My PC On The Whole Day And I Become To Know That Python Scripts Cannot Run When Your PC Is Off…
So, Please Suggest And Best, Free And Safe Solution Of This Problem Where I Can Run My My Python Scripts When My PC Is Completely Off…
You Can Provide Some Useful Links To Solve This Problem…
I agree with Steven, though will suggest there is probably some cron-like tool out there that will “catch up” on missed events when the computer is rebooted. That still adheres to Steven’s operational definition of what computers can (and can’t) do when turned off.
Tracking down such a tool is left as an exercise for the OP.
Task Scheduler should be able to do it on Windows, and you can also have it wake the system from sleep. On on macOS systems, there’s some sort of hardware watchdog that can not only wake the system from sleep to run a task at a scheduled time, but actually boot it from being shut down, and then shut it down again. To do that on Windows or Linux you’d probably need wake on LAN or an external relay (which I’ve done for our RPis deployed in the field).
Yes, Apple hardware often turns on and off from software, which means that when you think the device is powered down, it might not be. That has dangerous implications: