How to manage the execution of scheduled tasks from the terminal

Did you think that executing scheduled tasks was complicated under Linux? Well, it's actually simple. Very few know that it is possible to execute a command or series of commands at the desired time using the command at.


Let's say you want to run mplayer at 10:15 in the morning. I simply opened a terminal and wrote:

at 05

Then, I wrote the commands that you want to be executed at that time. For example,

mplayer movie.avi

Hit Enter to separate each of the commands.

Finally, press Ctrl + D to return to the terminal command line.

To see a list of the commands on the eve of running, I typed

at-l

To remove a scheduled task from the list, I typed

atrm 1

Where 1 is the ID of the task according to at-l.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Leandro sabo said

    Very, very good. This is great, it is also very simple and straightforward.

  2.   Saito Mordraw said

    Our best friend is the mighty terminal!

    =D

  3.   neo61 said

    I saw this a few months ago but hadn't had time to test it. Now reading more calmly, the doubt arises, or rather, I need to know where the file to be executed should be, I mean, putting a movie as an example, where it should be, or is it that it should be on the list of reproduction? If so, then it is not as simple as it seems in this explanation, since it would be necessary to program in mplayer or any other multimedia player that, when opened, executes its list. I need to clarify this.