I want to have my computer set its volume to a specific level every night at 11:45 PM. I'm running OSX 10.11.4. I can set the volume manually through terminal with
osascript -e "set Volume 1.7"
or as a script with
set volume 1.7
I want it to be scheduled nightly though. It's hard to find anything online that isn't super outdated. I don't really want to use iCal. From what I've found online, launchd is the way to go, but as a noob, I don't know where to start.
I see things about using a .plist in /Library/LaunchAgents. So I found a nifty plist generator Launched.zerowidth.com but what kind of code do I put in the plist to get the desired effect? I'm also questioning if this is the correct path for this to execute if any user is logged on.
Am I going down the wrong path here? I'm open to any ideas to make this happen, but I don't want to use a 3rd party app that I have to keep open all the time.
Thanks,
Naboo
cronstill works on macOS (as of macOS 11 Big Sur 2020). It's fine to use tocron. Apple's documentation says "In OS X, you can run a background job on a timed schedule in two ways:launchdjobs andcronjobs. (Older approaches, such asatjobs andperiodicjobs are deprecated and should not be used.)"