Mac OS X,  Ubuntu,  Unix

Using My Mac As An Alarm Clock

The at command can be used to schedule jobs to be run at certain times. I have a hard time getting up in the morning. Here, we’re going to echo a command that we want to be run at a certain time. In this case, we’re going to open a song to make into our alarm clock:

echo 'open ~/Desktop/bangbang.m4v 2>/dev/null' | at 07:00 tomorrow

The job will then output. You can see jobs waiting to be run, along with when they’ll be run using the at command with the -l option:

at -l

In this case, the job is 2. You can then remove a job using the atrm command:

atrm job 2