Use “at” to schedule launching of commands in Linux

By | September 29, 2010

You can execute a task at the time you want it to launch by using at. Let’s say you want mplayer start playing a movie at 12:42. Do a

at 1242

A command prompt will appear where you can type the command you cant to execute at 12:42

mplayer movie.avi

Next, press Enter then press Ctrl+D to exit the command line. The job will run in the background and will execute the command at the time requested.
You can always view a list of scheduled commands with at -l or remove a task with atrm 1 (where 1 is the job ID given by at -l).

2 thoughts on “Use “at” to schedule launching of commands in Linux

  1. plitter

    It does not work with mplayer or firefox. I tried the mplayer and I hear the first millisecond of sound then it shuts down. Firefox wont even open.

    Reply
  2. Sanjay

    You have a great collection of Linux Tips and Tricks and off cource you helped our novice Linux User to make their distro use simplier ,I am running a website on Technology http://www.cellguru.co.cc and interested to post you tricks on my website I will also provide credit and backlings of your website If you your interested then please contact me at admin@cellguru.co.cc and please provide guidlines and your website link.
    Thanks in advance

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *