When you do so, you’ll get a line telling you the job number and date and time it will run. When you are done, press Control-D (the Unix end of data character, often written in examples as “^D”). I’ll just demonstrate with the “ echo” command. Enter as many Unix commands as you like, one per line. Once you give this command the terminal will wait for your input. So if it’s currently 10:00 AM, then the commmand “ at 1002” will run the command(s) in 2 minutes. The command is simply “at” followed by a time or date (or both). You will need to do this again if you reboot, though there is a way (see Reference 1) to turn it on permanently. To turn it on you have to give the command 1 sudo launchctl load -w /System/Library/LaunchDaemons/ The “ at” service is provided by a Unix daemon called “atrun”, which is turned off by default on a Mac. With the Finder it is in /Applications/Utilities, while using Launchpad you will find it in a folder called either “Other” or “Utilities”. I’ll use downloading a file as an example in what follows, but you can use this to run almost any command at a specified time.Īs you might expect, everything here is done via the command line, which means you will have to run the Terminal app. Since the Apple Macintosh computer is based on BSD Unix, this feature is available on a Mac, though it is turned off by default. For example, if you want to download a large file in the middle of the night, when there is less congestion on the network, you can easily do so. Unix computers have a simple command-line feature called “ at” which lets you schedule a command, or a series of commands, to be run at a specific time.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |