command: at
usage:  queue, examine or delete jobs for later execution
            executes commands at a specified time.

syntax:  at [-c | -k | -s] [-f filename] [-q queuename] [-mMlv] -t
time [date] [-l] [-r]

options: -c       C shell is used to execute the at-job.
            -m  sends mail once the command has been run.
            -k    Korn shell.
            -s    Bourne shell.
            -f    filename      specifies the file that contains the
                  command to run
            -t    time specifies at what time you want the
                  command to be ran.
        date      specifies the date you wish it to be ran on
            -l    lists the commands that have been set to run.
            -r    cancels the command that you have set in the past.
            -M  never send mail to the user
            -v   Shows the time the job will be executed before reading the job

super user can use 'at' command in any case but for normal users to
work out this
command will be determined by the files /etc/at.allow and /etc/at.deny


example:

1. $ at -m 06:00 < atjob

    run the commands listed in the 'atjob' file at 06:00 a.m ,all output that
    is generated from job mail to the user running the task

2. $ at 10 am apr 13

    to schedule a job at 10 am on apr 13

3. To view all the scheduled jobs

    $ atq

    or

    $ at -l

4. To remove the schedule job

    $ atrm 5

    or

    $ at -d 5

    will delete the job number with 5

5. To schedule jobs from file at 10 am apr 13

    $ cat duejobs.txt

    /home/mercury/sample.sh

    $ at -f duejobs.txt 10 am apr 13

6. To process a command

    # batch

    will be prompted for 'at'

    at> command

    save it by ctrl -d

7. $ at 6 am tomorrow
    will execute command at  6 am tomorrow

    $ at now + 1 day
    will execute command 1 day from now

    $ at now + 2 days
    will execute command 2 days later from now

regards,
dhanasekar
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to