



(12 ratings)
Scheduling
of tasks under Linux is an extremely powerful procedure which
is used by almost everyone. Scheduling of tasks basically means
running whichever program you want at a particular time without
having to manually be present at the machine at that time.
Linux
will run that program for you at that time. In this article
I shall explain the simplest way to schedule tasks using the
simple command called 'at'.
Procedure :
At the prompt type this command followed by <Enter>
$ at 2359
The moment you press Enter the prompt changes into an arrow
indicating that more information is required by Linux. Type
the following command assuming you have installed XMMS player
which plays mp3 files and that you actually have a mp3 file
in the directory shown below
> xmms /home/david/mp3s/rock_my_world.mp3
Once you have typed the above press <Enter> and then finally
press <Ctrl>-D
Thats it. Now Linux will make the XMMS player to play the particular
mp3 file at the time 23:59. Thats just a minute before midnight.
Linux surely rocks your world !! ;-)
Basically if you are using the 24 hour clock then you enter
the time you want with the hours and the minutes together one
after another. Hours = 0-23 & Minutes = 0-59. Then type
the exact command that you would have typed had you wanted to
execute the task manually. If you want you can issue more commands
after the first one. Once you finish entering all the tasks
press <Ctrl>-D to indicate that you have finished. Then
wait and enjoy.. Linux will do the rest.
Remember :
At any time you can see the list of pending jobs by typing the following at the prompt
$ at -l (that a lowercase 'L')
If you want to remove any particular job in case you suddenly decided that you don't want that program to execute then first get the list of pending jobs as shown above. You will see that every job has a corresponding ID associated with it. Use the command below (In this case to remove job with ID=10)
$ atrm 10
20 Random Tutorials from the same category :
Basic Graphics Programming With The Xlib Library
Linux file permissions
Change from text login to graphical login
How to change a file's owner and group in Linux
Linux XP - a joke becoming reality?
Using Emacs
Manipulating directories in Linux
Manipulating Files And Directories In Unix
Linux keyboard shortcuts
Installing software from RPM packages
How to use the most popular command in Unix - Grep
Linux's directory structure
Redirection in Linux
What are the SUID, SGID and the Sticky Bits?
A Quick Introduction to Bash Programming - Part 1
Network programming under Unix systems
How to find files in Linux using 'find'
Unix Multi-Process Programming and Inter-Process Communications (IPC)
Parallel Programming - Basic Theory For The Unwary
The humble Linux cheat sheet













