You are on page 1of 2

Scheduling :-

Unix gives you the ability to schedule scripts and commands for execution at some later time.
You can specify the exact time when the command should be run.
Also provide a way of reporting on the scheduling jobs and removing them if you don’t execute
them.
At :-

allows you to do
(1) Scheduling a command for execution at a specified time.
(2) Display a list of scheduled jobs.
(3) Removing jobs from the specified jobs list.

Flag :-

-l Display a list of jobs scheduled by you.


-m Mail a report of successful execution of the jobs.
-t date Schedule a job to be executed at the specified date and time.
-r joblist Remove the jobs specified in the jobs list from the queue.

Example:- my job at 11:00 -> assuming that current time is 9:30 p.m.
at 2300 my job
at 23:00 my job
at 11:00 p.m. my job
at 23:00 today my job
at now + 6 hours my job
at 6:30 p.m. next week my job.

AtQ :- Can be used to list the jobs scheduled at a later time.

The jobs are displayed in the order of time at which the earlier-scheduled jobs displaled first.
Flag :-

-c -> Display a list of jobss in order of time at which the at command was
executed to schedule the jobs.
-n -> Display the number of scheduled jobs.

Crontab :- Unix system have a daemon running all the time that can run jobs at
regularly scheduled intervals.

Crontab file of the following fields (Seperately spaces or tabs)

minutes
hour
day
year
day of the week
command
Example :- lunch at 12:20 then
30 12 * * * * echo “Tome to go for lunch “

If you want to execute my job on Friday at 4:00 p.m. every week then
0 16 * * 5 my job.

You might also like