How to create a batch job in linux?



  • A batch job runs when the load average is below 0.8.

    At the prompt, type batch. At the at> prompt, type the command you want to run followed by Enter followed by the next command if necessary, followed by Enter and finally Ctrl-D.

    # /usr/bin/batch
    at> ls -l / > /tmp/batch.out
    at> 
    job 7 at 2009-07-21 08:23
    

    The above batch job will redirect the output of "ls -l /" to /tmp/batch.out when the load average is below 0.8.


Log in to reply
 

© Lightnetics 2024