32

The pmset terminal command should do what you want. The following will put the computer to sleep at 23:45:00 on December 2, 2014. The command must be run from an administrator account though: sudo pmset schedule sleep "12/02/14 23:45:00" The MM/DD/YY date format cannot be changed; so, if you are used to a different format, use caution. If you do this on ...


16

This is possible in iOS 14 using the Shortcuts app. You have to create an automation to enable the airplane mode in the evening and another automation to disable it in the morning. I used the following: Create automation At 22:30 → Airplane mode ON Disable “Ask before running” Finish The same process for the morning Create automation At 5:30 → Airplane ...


10

Others have already answered why cron was superseded. As for the other question: will it eventually be completely removed from future releases? cron is a required utility/service of the POSIX and Unix standards. Thus, there are only two circumstances under which cron would actually be removed from macOS: Apple decides that being an officially certified ...


9

By default there is no way of doing that with the options you have in the system preferences. But, you could do it from command line with a simple command: sleep 10; osascript -e 'tell application "System Events" to sleep' sleep 10 pause the execution of the following command for 10 seconds. If you want minutes or hours you must change 10 with number of ...


7

Apple does not allow apps to "play with" that system setting. That's the technical reason why there's no app for it. It might be able using a jailbreak tweak if it has to change every day (for example: monday between 2 and 4, tuesday between 2 and 3 etc.) However if you go to: Settings Do not disturb Scheduled Pick the time of your desire You're done


6

For iOS 12 and older, it's not possible to schedule Airplane Mode unless you have a jailbroken device. If you want to jailbreak your iPhone, there's a few apps that do this exact thing. This sounds like it would be a good idea so I recommend you let Apple know you want this on their iPhone Feedback page.


4

There is no feature for automatic turning off with no jailbreak. However, you can: Schedule "Do not disturb mode" and it will not turn you screen on to show useless notifications Manually turn on "Low power mode" to stop all background processes and save your battery. Plug it into a power source with no worries, since iOS 11.3 iPad has a new "iPad Charge ...


4

You will need a add a "Run at Load" key and set it to false. <key>RunAtLoad</key> <false/> This will prevent running at startup and only at your manually specified time.


4

You could use Do not Disturb mode. Found under Settings / Do Not Disturb or in Control Center (the moon icon), this mode silents calls, alerts and notifications and it can be scheduled to be automatically enabled between specified hours.


4

Based on @Gintaras's answer, since you can run a shortcut from a shell script, I was able to get it done - but not with launchd. Instead, I created a new application in the Automator app, to run a shell script, with the contents: #!/bin/sh cd /Users/MY_USER_NAME shortcuts run "Email Schedule to Yourself" Then I added a recurring calendar entry at ...


3

Print Job scheduling was removed in OS X 10.7 Lion. As a workaround, you can pause the printer, print what you want then continue the printer. You can provide feedback to Apple regarding this on the following page: http://www.apple.com/feedback/macosx.html


3

In recent versions of OS X launchd is preferred to cron. Here's an excerpt from man crontab under Mavericks: Darwin note: Although cron(8) and crontab(5) are officially supported under Darwin, their functionality has been absorbed into launchd(8), which provides a more flexible way of automatically executing commands. You can control launchd using the ...


3

This is just a slightly more efficient re-hash of the existing answer... set gIsThisTime to false repeat until gIsThisTime is true delay 60 set myTime to time string of (current date) if myTime > "1:15:00 pm" and myTime < "1:20:00 pm" then set gIsThisTime to true end if end repeat set myDate to date string of (current date) ...


3

launchd On macOS, launchd is Apple's replacement for cron. I don't know what the "official" replacement for at is. See the StartCalendarInterval key in launchd.plist(5) to get started.


3

TL;DR Summary: launchd is "better" than cron in many ways, but these sorts of repetitions are an example of one way where cron is easier than launchd. To do this in launchd is excessively verbose. (That link will take you to a gist because it is literally too long to post to StackExchange.) Keyboard Maestro supports cron-style execution times. If I ...


3

Related question on Stack Overflow: Scheduling a terminal command or script file to run daily at a specific time Mac OS X People are using launchd to achieve this. Personally, i use mysql server events with lib_mysqludf_sys-master and dedicated table replicating events. Hard to setup everything, but it's very convenient to add/edit/remove jobs by simply ...


2

Scheduler for MacIntosh is a gui-based task scheduler for macOS can be downloaded at https://macscheduler.net/. Been using it to run a backup app I wrote. Runs in background, doesn't need to be opened at startup. Can launch apps, scripts, docs.


2

For power control of your Mac from your iPhone on a local network, I have used Off Remote which can also schedule within the next 24 hours a system action (Shutdown, Lock, Restart, Log off, Sleep) and is only $3 in the iOS store but requires installation of an additional helper app on your Mac to receive the instructions from the iPhone app. Another answer ...


2

The traditional approach, e.g. with cron jobs, is to pipe standard error to a program like mail that's smart enough not to send you empty mail. The difference with launchd, as you've discovered, is that the mechanism for redirecting standard error is giving a StandardErrorPath for it to be written to, which isn't as convenient for this purpose as ending your ...


2

I'm afraid that no such thing exists. The best you can is to schedule it to go into Do Not Disturb mode overnight, which will save a little battery, but not very much.


2

Open the Mac App Store and search for "Alarm Clock". Take your pick from the many apps that will do the job.


2

Open Automator and do something like this. Use Workflow + Drag New Calendar Event to the right. Choose the time+date. Choose what file to open. Obviously set the date/time and choose the right file to Open.


2

You can't add a crontab entry by just running crontab <entry details>. In your case the shell expands the * with whatever filenames it finds in the current directory (which seems to be a file called LICENSE, replace crontab by echo to see what happened to the other *'s). To add new entries to the crontab file run export EDITOR=nano crontab -e add ...


2

Run a script at start-up or login. Within the script, run a check to see if sunrise has recently occurred. If so, perform the iTunes script. Your script needs to determine how long ago sunrise occurred. If the time since sunrise is short enough, run the script. Short enough might be five minutes ago; it is unlikely a Mac is restarted within five minutes of ...


2

No. You can't create a recurrence for this granular of a rule set. I'm paid every month; I'm paid always on the last possible day before the 28th day of the month; I'm paid always on a working day. So, to simplify it, you're paid the 27th of every month unless it's a weekend or holiday, then you're paid the previous workday. Your options are as follows: ...


2

If there is a “right” way from Apple’s point of view, then it’s launchd. Not that cron is “wrong” per se but it is not the “preferred” way. However, as you indicated, launchd can be a pain to work with. There are two good apps to try: https://www.soma-zone.com/LaunchControl/ ¹ https://www.peterborgapps.com/lingon/ Lingon has been around for a long time ...


2

A cron job, something like 0 6 * * * killall Mail && open -a "Mail.app" You can run as complicated a script as you want like the following 0 6 * * * sh path_to_the_script.sh Add it to cron with crontab file_above.txt See man crontab for more info. https://crontab.guru/#0_6_*_*_*


1

Thanks everyone just got this working! The first answer did work. My issue was that I didn't unload the first launchd .plist even though I deleted the file. It keep remembering it on each restart. I ended up re imaging two iMacs and tested the launchd .plist with the added command. Tested with loading it and unloading it to confirm. After countless ...


1

This isn't possible due to iOS restrictions.


1

As far as I'm aware there's no way to change this value because a Mac must be awake for at least 10 minutes past the scheduled time. It's because of this that the 10 minute value is set and cannot be altered, although I suppose there's no reason why it couldn't be extended beyond that (such as the 30 mins you want). Regardless, I'm not aware that this can be ...


Only top voted, non community-wiki answers of a minimum length are eligible